My NFC functionality is in place and working. The tags have an empty Message, so I read the ID.
Problem
When there is no data in the message to force open a specific app, a pop-up appears for every NFC tag.
There is no “Always” option in this pop-up to always use my app.
This slows down scanning.
It’s not a viable solution to rewrite all the tags.
I’ve tried
- Set the NFC settings to prioritize the current app (my app). This has no effect.
- Explored NFC payment app options, but my app is not a payment app, so I can’t set a default NFC payment app.
- Searched the web for solutions.
- Read the official Settings documentation.
Some solutions mention the App Inspector app, which allows me to search for the Tags app and disable it. This does what I want, but I would like the user to be taken to this setting on login to my app.
Expected: A way to select a default NFC app instead of Tags.
Actual: Pop-up every time.
Tentative solution
- Check for presence of the Tags app using Package Manager.
- Check if it’s already disabled.
- If present and enabled, take the user to the Disable option for com.android.apps.tags.
Question
I was thinking that it was a simple matter of the correct ACTION constant as for Exact Alarms permission, but since it’s for a specific package name, I must do this slightly differently. How?