Is there a way to capture the NFC shortcut without turning onPause / onResume?

looking at this question: onNewIntent () and registered listeners

I see that the OP is experiencing the same problem as me, but I do not understand why this solution serves its purpose.

When a user types NFC on a device, I collect information from the incoming Intent, however I do not want onPause or onResume to shoot while collecting this data. If there is no way to prevent this, is there any other way for me to collect the incoming NFC information, other than listening to onNewIntent? I have a bunch of logic in onResume that is completely unprepared to suddenly cope with what it causes when the user did not leave the application ... I hope to avoid having to reorganize my code to deal with this unexpected unforeseen circumstances. Thanks in advance.

+6
source share

All Articles