RoopeHakulinen / cordova-plugin-mifare-ultralight

Cordova plugin for interacting with Mifare Ultralight NFC tags.
MIT License
9 stars 3 forks source link

Read error on Cordova React app for Android #8

Open josera21 opened 6 years ago

josera21 commented 6 years ago

Hi, when I use window.mifare.read(4, (response) => alert(response.data), err => alert(Reading failed because ${err}));

Is show me this error

Error: java.lang.exeption

RoopeHakulinen commented 6 years ago

Hey @josera21!

Unfortunately the error handling in the library is not that sophisticated and some errors don't get reported too clearly.. One case where the exceptions happen is that if the tag is moved away before or while the read is still ongoing. Another option is that page with that page number is not available (doesn't exist or is protected with PIN code).

Sorry but there's not much I can help with these details.

josera21 commented 6 years ago

Ok @RoopeHakulinen thank you for respond, actually the library works fine with a project on Monaca CLI but with Cordova I seem this error.