chariotsolutions / phonegap-nfc

PhoneGap NFC Plugin
MIT License
706 stars 557 forks source link

Add reader mode that allows making NFC reading silent. #222

Closed jezdez closed 6 years ago

jezdez commented 8 years ago

Refs #198.

jezdez commented 8 years ago

@don Hi, I took the liberty to take a stab at adding a "reader mode", one that uses the simpler API that doesn't use intents.

I'm a total Java newbie so this looks probably horrible and wrong, for some things I just didn't know a better way to write them, e. g. I'd much rather have added a boolean option to the nfc.readerMode function that indicates if the reader mode should be running in silent or not.

In any case, I'm happy to make modifications, work on the docs or simply let this be thrown away because that's not how it should be implemented or even at all. Let me know if you have any questions.

Cheers! :beers:

jezdez commented 8 years ago

I've made the changes proposed by @jlkalberer and would love to get some feedback on this again. Turning off the NFC reading sound is quite awesome IMO. Please let me know how I can improve this PR. Cheers!

don commented 8 years ago

@jezdez thanks for the pull request. I'm going to need review and testing before it can be merged to make sure it doesn't break any of the existing functionality.

jezdez commented 8 years ago

@don Awesome, thank you!

AVancans commented 7 years ago

How long does it take to review a PR? It's been half a year already @don

franDayz commented 7 years ago

+1

franDayz commented 7 years ago

Since the change has not been merged yet to master, I added your branch as plugin by doing cordova plugin add https://github.com/jezdez/phonegap-nfc#reader-mode Unfortunately after doing so nfc.addTagDiscoveredListener stopped working :(

Does it work for anyone?

jezdez commented 6 years ago

FTR, I did not in the end use this code, so in case anyone is interested, please take over from here.

don commented 6 years ago

Closing this pull request. Im working on a new implementation. See https://github.com/chariotsolutions/phonegap-nfc/issues/198#issuecomment-393751978 for more details.

jezdez commented 6 years ago

@don Huzzah!