As I understand, the Android 2.3 uses a single step approach for NFC tag detection (TAG_DISCOVERED only).
<intent-filter>
<action android:name="android.nfc.action.TAG_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
This means that if more then one activity declares the intent to read NFC tag, the activity selection dialog “Complete action using” pop-ups because the “Tags” application already has an TagViewer activity for handling the NFC tags.
Is there a way to avoid the dialog?
BR
STeN
I think you’re out of luck in stock 2.3; you’ll get that dialog as long as the default Tags app is also installed.
However, in the 2.3.3 update and later, there’s a more complicated set of intent-filters. See here:
http://programming-android.labs.oreilly.com/ch16.html#ch18_id316624
You may be able to use the ACTION_NDEF_DISCOVERED filter to catch it before the tags app does with the normal TAG_DISCOVERED fitler. A downside is that you might need to register for certain URIs or MIME types. I haven’t tried this myself.