chariotsolutions / phonegap-nfc

PhoneGap NFC Plugin
MIT License
706 stars 559 forks source link

Check if NFC hardware is present #174

Closed mm108 closed 9 years ago

mm108 commented 9 years ago

hi,

Is there a way to check if NFC hardware is present in the first place - irrespective of whether NFC is turned on or off?

Thanks, M&M

mm108 commented 9 years ago

I guess the below should work.

nfc.enabled( function() {alert('yes!')}, // msg is one of NO_NFC (no hardware support) or NFC_DISABLED (supported but disabled) function(msg) {alert(msg)} );

Please let me know if i am wrong. Thanks a ton

don commented 9 years ago

@m-menon enabled will return NO_NFC if the device doesn't support NFC

https://github.com/chariotsolutions/phonegap-nfc#nfcenabled

mm108 commented 9 years ago

cool...thank you