I hope that someone can help me with this.
As you know when an NFC tag is detected automatically we have a window dialog that contains the list the application that we can use. To avoid this there is a way with pending event to intercept the tag and avoid the window dialog with the list.
My problem:
I have a TabActivity with two activities.
One of the two activities read a tag (we can call this activity as follow: “READ_ACTIVITY“).
When a tag is detected I don’t want change my screen, I want to stay in the same interface where I am before the interception of the tag.
As I said it’s possible to do it with the following code:
mAdapter.enableForegroundDispatch(hereiam, intent, null, null);
where intent is a pendingIntent.
Now this foreground dispatch is done by READ_ACTIVITY.
My problem is that when a tag is detect, the application open a new READ ACTIVITY, while I would like to stay in the tabactivity. Someone knows how to stay in the tabactivity when a tag is detected?
Thanks in advance
You need to set the TechList that you wanna intercept and also the intentFiltersArray, please follow the documentation about this, as well as the NFC and API demos samples, the already implement what you want.