diff --git a/src/@ionic-native/plugins/qr-scanner/index.ts b/src/@ionic-native/plugins/qr-scanner/index.ts index da96e1ea47..086133db5a 100644 --- a/src/@ionic-native/plugins/qr-scanner/index.ts +++ b/src/@ionic-native/plugins/qr-scanner/index.ts @@ -1,5 +1,5 @@ -import { Plugin, IonicNativePlugin, Cordova } from '@ionic-native/core'; import { Injectable } from '@angular/core'; +import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; import { Observable } from 'rxjs/Observable'; export interface QRScannerStatus { @@ -86,11 +86,6 @@ export interface QRScannerStatus { * scanSub.unsubscribe(); // stop scanning * }); * - * // show camera preview - * this.qrScanner.show(); - * - * // wait for user to scan something, then the observable callback will be called - * * } else if (status.denied) { * // camera permission was permanently denied * // you must use QRScanner.openSettings() method to guide the user to the settings page @@ -115,7 +110,6 @@ export interface QRScannerStatus { }) @Injectable() export class QRScanner extends IonicNativePlugin { - /** * Request permission to use QR scanner. * @return {Promise} @@ -123,7 +117,9 @@ export class QRScanner extends IonicNativePlugin { @Cordova({ callbackStyle: 'node' }) - prepare(): Promise { return; } + prepare(): Promise { + return; + } /** * Call this method to enable scanning. You must then call the `show` method to make the camera preview visible. @@ -134,21 +130,27 @@ export class QRScanner extends IonicNativePlugin { observable: true, clearFunction: 'cancelScan' }) - scan(): Observable { return; } + scan(): Observable { + return; + } /** * Configures the native webview to have a transparent background, then sets the background of the and DOM elements to transparent, allowing the webview to re-render with the transparent background. * @returns {Promise} */ @Cordova() - show(): Promise { return; } + show(): Promise { + return; + } /** * Configures the native webview to be opaque with a white background, covering the video preview. * @returns {Promise} */ @Cordova() - hide(): Promise { return; } + hide(): Promise { + return; + } /** * Enable the device's light (for scanning in low-light environments). @@ -157,14 +159,18 @@ export class QRScanner extends IonicNativePlugin { @Cordova({ callbackStyle: 'node' }) - enableLight(): Promise { return; } + enableLight(): Promise { + return; + } /** * Destroy the scanner instance. * @returns {Promise} */ @Cordova() - destroy(): Promise { return; } + destroy(): Promise { + return; + } /** * Disable the device's light. @@ -173,7 +179,9 @@ export class QRScanner extends IonicNativePlugin { @Cordova({ callbackStyle: 'node' }) - disableLight(): Promise { return; } + disableLight(): Promise { + return; + } /** * Use front camera @@ -182,7 +190,9 @@ export class QRScanner extends IonicNativePlugin { @Cordova({ callbackStyle: 'node' }) - useFrontCamera(): Promise { return; } + useFrontCamera(): Promise { + return; + } /** * Use back camera @@ -191,7 +201,9 @@ export class QRScanner extends IonicNativePlugin { @Cordova({ callbackStyle: 'node' }) - useBackCamera(): Promise { return; } + useBackCamera(): Promise { + return; + } /** * Set camera to be used. @@ -201,28 +213,36 @@ export class QRScanner extends IonicNativePlugin { @Cordova({ callbackStyle: 'node' }) - useCamera(camera: number): Promise { return; } + useCamera(camera: number): Promise { + return; + } /** * Pauses the video preview on the current frame and pauses scanning. * @return {Promise} */ @Cordova() - pausePreview(): Promise { return; } + pausePreview(): Promise { + return; + } /** * Resumse the video preview and resumes scanning. * @return {Promise} */ @Cordova() - resumePreview(): Promise { return; } + resumePreview(): Promise { + return; + } /** * Returns permission status * @return {Promise} */ @Cordova() - getStatus(): Promise { return; } + getStatus(): Promise { + return; + } /** * Opens settings to edit app permissions. @@ -231,5 +251,4 @@ export class QRScanner extends IonicNativePlugin { sync: true }) openSettings(): void {} - }