chariotsolutions / phonegap-nfc

PhoneGap NFC Plugin
MIT License
706 stars 557 forks source link

Fail gracely on unsupported platforms #213

Closed mobidev111 closed 8 years ago

mobidev111 commented 8 years ago

On windows 8.1 (not windows phone) the plugin fails with the following message:

   adding proxy for NfcPlugin
   WARNING: proximity device is null
   Registering for NDEF
   TypeError: Unable to get property 'subscribeForMessage' of undefined or null reference
   adding NFC Listener failed: TypeError: Unable to get property 'subscribeForMessage' of undefined or null reference
   Error in Error callbackId: NfcPlugin816380662 : adding NFC Listener failed: TypeError: Unable to get property 'subscribeForMessage' of undefined or null reference
   Exception calling native with command :: NfcPlugin :: registerNdef ::exception=adding NFC Listener failed: TypeError: Unable to get property 'subscribeForMessage' of undefined or null reference
   Initialized the NfcPlugin

-> better fail by testing for supported platforms

JohnMcLear commented 8 years ago

8.1 is working for me, can you provide your source code so we can replicate please?

don commented 8 years ago

Fixed in 0.6.6