Skip to content

Commit

Permalink
feat(barcodescanner): add encode function
Browse files Browse the repository at this point in the history
closes #115
  • Loading branch information
ihadeed committed Jun 11, 2016
1 parent 71b89ee commit e73f57f
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/plugins/barcodescanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,26 @@ 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.
*/
@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; }

}

0 comments on commit e73f57f

Please sign in to comment.