Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: New tag collected - Unknown tag type

Tags:

android

nfc

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?

like image 807
pimd Avatar asked Feb 09 '12 13:02

pimd


2 Answers

Go to settings -> Apps -> All -> Tags(in my case) -> disable it

like image 83
Rajkumar Avatar answered Sep 19 '22 12:09

Rajkumar


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.

like image 30
robertly Avatar answered Sep 18 '22 12:09

robertly