mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-04-13 00:00:10 +08:00
Merge in v5 code
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Plugin, IonicNativePlugin, Cordova } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
@@ -123,7 +123,9 @@ export class QRScanner extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
callbackStyle: 'node'
|
||||
})
|
||||
prepare(): Promise<QRScannerStatus> { return; }
|
||||
prepare(): Promise<QRScannerStatus> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call this method to enable scanning. You must then call the `show` method to make the camera preview visible.
|
||||
@@ -134,21 +136,27 @@ export class QRScanner extends IonicNativePlugin {
|
||||
observable: true,
|
||||
clearFunction: 'cancelScan'
|
||||
})
|
||||
scan(): Observable<string> { return; }
|
||||
scan(): Observable<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures the native webview to have a transparent background, then sets the background of the <body> and <html> DOM elements to transparent, allowing the webview to re-render with the transparent background.
|
||||
* @returns {Promise<QRScannerStatus>}
|
||||
*/
|
||||
@Cordova()
|
||||
show(): Promise<QRScannerStatus> { return; }
|
||||
show(): Promise<QRScannerStatus> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures the native webview to be opaque with a white background, covering the video preview.
|
||||
* @returns {Promise<QRScannerStatus>}
|
||||
*/
|
||||
@Cordova()
|
||||
hide(): Promise<QRScannerStatus> { return; }
|
||||
hide(): Promise<QRScannerStatus> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable the device's light (for scanning in low-light environments).
|
||||
@@ -157,14 +165,18 @@ export class QRScanner extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
callbackStyle: 'node'
|
||||
})
|
||||
enableLight(): Promise<QRScannerStatus> { return; }
|
||||
enableLight(): Promise<QRScannerStatus> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy the scanner instance.
|
||||
* @returns {Promise<QRScannerStatus>}
|
||||
*/
|
||||
@Cordova()
|
||||
destroy(): Promise<QRScannerStatus> { return; }
|
||||
destroy(): Promise<QRScannerStatus> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable the device's light.
|
||||
@@ -173,7 +185,9 @@ export class QRScanner extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
callbackStyle: 'node'
|
||||
})
|
||||
disableLight(): Promise<QRScannerStatus> { return; }
|
||||
disableLight(): Promise<QRScannerStatus> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use front camera
|
||||
@@ -182,7 +196,9 @@ export class QRScanner extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
callbackStyle: 'node'
|
||||
})
|
||||
useFrontCamera(): Promise<QRScannerStatus> { return; }
|
||||
useFrontCamera(): Promise<QRScannerStatus> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use back camera
|
||||
@@ -191,7 +207,9 @@ export class QRScanner extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
callbackStyle: 'node'
|
||||
})
|
||||
useBackCamera(): Promise<QRScannerStatus> { return; }
|
||||
useBackCamera(): Promise<QRScannerStatus> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set camera to be used.
|
||||
@@ -201,28 +219,36 @@ export class QRScanner extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
callbackStyle: 'node'
|
||||
})
|
||||
useCamera(camera: number): Promise<QRScannerStatus> { return; }
|
||||
useCamera(camera: number): Promise<QRScannerStatus> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pauses the video preview on the current frame and pauses scanning.
|
||||
* @return {Promise<QRScannerStatus>}
|
||||
*/
|
||||
@Cordova()
|
||||
pausePreview(): Promise<QRScannerStatus> { return; }
|
||||
pausePreview(): Promise<QRScannerStatus> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resumse the video preview and resumes scanning.
|
||||
* @return {Promise<QRScannerStatus>}
|
||||
*/
|
||||
@Cordova()
|
||||
resumePreview(): Promise<QRScannerStatus> { return; }
|
||||
resumePreview(): Promise<QRScannerStatus> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns permission status
|
||||
* @return {Promise<QRScannerStatus>}
|
||||
*/
|
||||
@Cordova()
|
||||
getStatus(): Promise<QRScannerStatus> { return; }
|
||||
getStatus(): Promise<QRScannerStatus> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens settings to edit app permissions.
|
||||
@@ -230,6 +256,7 @@ export class QRScanner extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
sync: true
|
||||
})
|
||||
openSettings(): void {}
|
||||
openSettings(): void {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user