EddyVerbruggen / nativescript-nfc

:pencil: NativeScript plugin to discover, read, and write NFC tags
MIT License
84 stars 37 forks source link

allow instance with missing or background activity #46

Closed sylann closed 4 years ago

sylann commented 5 years ago

In the previous version, it was possible to instantiate the nfc handler in states where the app would crash.

This allows the user to instantiate the class at the very beginning of the app, as well a in the middle of a foreground activity.

fix #45

sylann commented 4 years ago

@EddyVerbruggen Hi Eddy,

Could you please check this pr?

EddyVerbruggen commented 4 years ago

Turned out I had to change a few small things, otherwise the demo app (npm run demo.android) crashed upon start.

I've just published 4.0.4 to npm and hope it's all fine for your usecase.