googlearchive / chrome-nfc

Chrome App NFC Library
Other
213 stars 69 forks source link

[Resolved] ACR122u-A9 How to check either it is a Card or Emulated Android Device #26

Closed shahbazali closed 8 years ago

shahbazali commented 8 years ago

Hi

Would you please help, how to get Card Type & UID ? in my business logic i wants to check either its a card or emulated phone? if its a card i need its UID, if its a phone i need NDEF for the Emulated Phone.

FYI, ACR122u-A9 reader is working for me on Windows 10.

Looking Forward.

beaufortfrancois commented 8 years ago

One thing you could do is calling chrome.nfc.read(device, {}, function(type, ndef) {} and if that fails you could try chrome.nfc.read_logic(device, 0, 2, function(rc, data) {..}. That's the best you can get with this library.

If you think it can be improved, please submit a PR and I'll be happy to review it.

shahbazali commented 8 years ago

@beaufortfrancois Thank you so much for your help, its saves my lots of time & efforts, i was struck since 1 months to read HCE phone from ACR External Readers, by reading & understanding your Chrome APP code, i was able to did it on iOS & Andorid as well.

Its very Simple process to check either its a Emulated Phone or a Card by ATR because allt he phones will have same ATR.

Appreciated. Thank you