diff --git a/src/@ionic-native/plugins/regula-document-reader/index.ts b/src/@ionic-native/plugins/regula-document-reader/index.ts index d4e7534b4..1628b8f9e 100644 --- a/src/@ionic-native/plugins/regula-document-reader/index.ts +++ b/src/@ionic-native/plugins/regula-document-reader/index.ts @@ -13,7 +13,8 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; * import { RegulaDocumentReader } from '@ionic-native/regula-document-reader'; * * let license; // read regula.license file - * RegulaDocumentReader.scanDocument(license).then((result) => { + * RegulaDocumentReader.initReader(license); // initialize reader + * RegulaDocumentReader.scanDocument().then((result) => { * // read result * }) * ``` @@ -23,17 +24,23 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; plugin: 'cordova-plugin-documentreader', pluginRef: 'DocumentReader', repo: 'https://github.com/regulaforensics/cordova-plugin-documentreader.git', - platforms: ['iOS'], + platforms: ['iOS', 'Android'], install: 'ionic plugin add cordova-plugin-documentreader --variable CAMERA_USAGE_DESCRIPTION="To take photo"', }) @Injectable() export class RegulaDocumentReader extends IonicNativePlugin { /** - * Run the scanner + * Initialize the scanner * @param license {any} License data + */ + @Cordova() + initReader(license: any): void {} + + /** + * Run the scanner * @return {Promise} Returns a promise that resolves when results was got, and fails when not */ @Cordova() - scanDocument(license: any): Promise { return; } + scanDocument(): Promise { return; } }