Reply To: What does registerActivity do?

Forum MIFARE general topics and applications What does registerActivity do? Reply To: What does registerActivity do?

Re: What does registerActivity do?

14. December 2016 at 14:29
Thank you for the explanation, that was helpful. But unfortunately I tried what you said and placed the call to registerActivity() only on the onCreate() of my main activity, and the application crashes. But if instead I put it on the onResume() of every NFC activity, before calling startForeGroundDispatch() it works flawlessly. I suspect there might be a bug in which once the library is initialized it doesn't update its state to recognize other activities since invocations to startForeGroundDispatch() and stopForeGroundDispatch() always end in error.

There's also a question regarding

if it never happened before, it connects to the NXP server one time

How can that be if I uninstalled the app completely, disabled any Internet connection in my device, then deployed from Android Studio the app again, and still isActivityRegistered() returns true?

+ 0  |  - 0