[NFC Plugin] OnNdefRead event calls OnApplicationResume

[NFC Plugin] OnNdefRead event calls OnApplicationResume

  
Forge Component
(1)
Published on 2016-07-18 by Experts
1 vote
Published on 2016-07-18 by Experts

Hello.

We're using this plugin in our mobile app and it works ok. We're using NdefListener.

However, we noticed that on the handler of OnNdefRead, when a query is run, for example, OnApplicationResume is always triggered.
It this a bug, or is this behaviour expected for some reason?

In our case, we cannot afford to have OnApplicationResume running every time we read an NFC card, so for now, we might have to change logic in OnApplicationResume to keep the NFC reading in the app.


Can you please help me?

Thank you,

Ana Almeida

Hi Ana, 

Unfortunately the OnApplicationResume is being triggered because in fact, when there's a NFC scan "session" the main activity of the application is thrown into background and superseded by the NFC read components that, when finishes, returns to the main activity making the OnApplicationResume to trigger.