feat(barcodescanner): add encode function

closes #115
This commit is contained in:
Ibrahim Hadeed 2016-06-11 10:56:30 -04:00
parent 71b89eef3d
commit e73f57f190

View File

@ -27,6 +27,12 @@ import {Plugin, Cordova} from './plugin';
})
export class BarcodeScanner {
static Encode: any = {
TEXT_TYPE: 'TEXT_TYPE',
EMAIL_TYPE: 'EMAIL_TYPE',
PHONE_TYPE: 'PHONE_TYPE',
SMS_TYPE: 'SMS_TYPE'
};
/**
* Open the barcode scanner.
* @return Returns a Promise that resolves with scanner data, or rejects with an error.
@ -34,7 +40,13 @@ export class BarcodeScanner {
@Cordova()
static scan(options?: any): Promise<any> { return; }
// Not well supported
// @Cordova()
// static encode(type, data){};
/**
* Encodes data into a barcode.
* NOTE: not well supported on Android
* @param type
* @param data
*/
@Cordova()
static encode(type: string, data: any): Promise<any> {return; }
}