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

nfc plugin maybe have something wrong when wrap up to phonegap-nfc #827

Closed
zhaoadou opened this issue Nov 25, 2016 · 8 comments
Closed

nfc plugin maybe have something wrong when wrap up to phonegap-nfc #827

zhaoadou opened this issue Nov 25, 2016 · 8 comments

Comments

@zhaoadou
Copy link

I have used the nfc native plugin to use addTagDiscoveredListener function .
It is defined
static addTagDiscoveredListener(mimeType: string, onSuccess?: Function, onFailure?: Function): Observable<any>

but i find the define in phonegap-nfc.js ,it is
addTagDiscoveredListener: function (callback, win, fail) { document.addEventListener("tag", callback, false); cordova.exec(win, fail, "NfcPlugin", "registerTag", []); }
I think there is no mimeType parameter when wrap up to cordova nfc plugin .

any ideas?

@stormwin
Copy link
Contributor

stormwin commented Nov 25, 2016

+1
Also there is some static functions that are missing in definition, like bytesToString, stringToBytes, bytesToHexString ... etc
I think that definition for nfc is out-of-date

@zhaoadou
Copy link
Author

@stormwin So that is there any plan to update the definition for latest version or not ?

@stormwin
Copy link
Contributor

stormwin commented Dec 7, 2016

tested locally and works great. will make a PR tomorrow

@DavidTalamona
Copy link

@stormwin: The "addMimeTypeListener" on the other hand needs a "mimeType" argument thats missing in TS and the documentation.
Think the initial creator of the TS just swapped the arguments of the two listeners.
So, please fix the "addMimeTypeListener" too and update the doc, thanks.

@stormwin
Copy link
Contributor

stormwin commented Jan 2, 2017

no problem, i will fix it

@dalbir
Copy link

dalbir commented Jan 5, 2017

Same Problem. Please Fix it.

@stormwin
Copy link
Contributor

stormwin commented Jan 5, 2017

#937

@DavidTalamona @dalbir Guys, just created PR with fix

@ihadeed ihadeed closed this as completed Jan 7, 2017
@ihadeed
Copy link
Collaborator

ihadeed commented Jan 7, 2017

Just merged it, will be available in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants