Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #827 #853

Merged
merged 1 commit into from
Dec 27, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions src/plugins/nfc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,18 @@ export class NFC {

/**
* Registers an event listener for tags matching any tag type.
* @param mimeType
* @param onSuccess
* @param onFailure
* @returns {Observable<any>}
*/
@Cordova({
observable: true,
successIndex: 1,
errorIndex: 4,
successIndex: 0,
errorIndex: 3,
clearFunction: 'removeTagDiscoveredListener',
clearWithArgs: true
})
static addTagDiscoveredListener(mimeType: string, onSuccess?: Function, onFailure?: Function): Observable<any> {return; }
static addTagDiscoveredListener(onSuccess?: Function, onFailure?: Function): Observable<any> {return; }

/**
* Registers an event listener for NDEF tags matching a specified MIME type.
Expand Down Expand Up @@ -152,6 +151,27 @@ export class NFC {
*/
@Cordova()
static enabled(): Promise<any> {return; }
/**
* Convert bytes to string
* @param bytes {number[]}
* @returns {string}
*/
@Cordova({ sync: true })
static bytesToString(bytes: number[]): string {return; }
/**
* Convert string to bytes
* @param str {string}
* @returns {string}
*/
@Cordova({ sync: true })
static stringToBytes(str: string): number[] {return; };
/**
* Convert bytes to hex string
* @param bytes {number[]}
* @returns {string}
*/
@Cordova({ sync: true })
static bytesToHexString(bytes: number[]): string {return; };

}
/**
Expand Down