On android, in the Nfc constructor, you are delaying the initialisation of the adapter with a setTimeout of 3 seconds.
This is causing an IllegalStateException if you pause the app between these 3 seconds.
I can't seem to find a way to catch this error, any idea?
--
By the way, I get this because I try to ask the user to enable NFC in the settings (and it would be a good idea to explain this part in your doc if you have a little time).
--
EDIT: Right now, to avoid the bug, I have removed the setTimeout from your code and I always instantiate the nfc handler inside of a page, only if needed.
On android, in the Nfc constructor, you are delaying the initialisation of the adapter with a setTimeout of 3 seconds. This is causing an IllegalStateException if you pause the app between these 3 seconds.
I can't seem to find a way to catch this error, any idea?
-- By the way, I get this because I try to ask the user to enable NFC in the settings (and it would be a good idea to explain this part in your doc if you have a little time).
-- EDIT: Right now, to avoid the bug, I have removed the setTimeout from your code and I always instantiate the nfc handler inside of a page, only if needed.