I've made an application that scans tags with the NFC scanner. Instead of the default Tag app, my app starts when a card is read.
It works completely, but there's one thing that is rather annoying: when I scan a card very fast, my application don't seem to respond, but the default Tag app opens (see https://i.stack.imgur.com/lGwiM.png). Is there any way to disable the default app or to start my app quicker?
Go to settings -> Apps -> All -> Tags(in my case) -> disable it
I assume you filter for NDEF_DISCOVERED in your app currently and this is the case that works. If so, I would add a TECH_DISCOVERED intent for now, making sure you add a technology that your card supports so that your app can catch this corner case. From the logcat, I can't figure out what technology this tag is, so can't help you figure this out.
After your app can filter for TECH_DISCOVERED, read the data that is on the tag and see if it actually has the complete payload. If it doesn't then this would suggest the scan isn't picking up the entire payload and that moving your phone quickly away is a limitation of NFC itself. If the payload is the complete payload, then I would consider this a bug. Please report back.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With