I am writing an application that is supposed to detect nfc tag and automatically be launched. I have succeeded in doing so by using TECH_DISCOVERED + filters but I think the better way to do it is by using NDEF_DISCOVERED. I have added the intent-filter to my manifest but it doesn't work. This is my manifest code for the TECH_DISCOVERED, that works:
<intent-filter>
<action android:name="android.nfc.action.TECH_DISCOVERED"/>
</intent-filter>
<meta-data android:name="android.nfc.action.TECH_DISCOVERED"
android:resource="@xml/nfc_tech_filter" />
when I want to try the NDEF_DISCOVERED i try:
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain" />
for the tags, I use 'Mifare classic 1k' tags that was written as 'Smart Poster' using NFC TagInfo app from the market.
What am I doing wrong? or, what is another way to make my app be launched and not show the activity selection dialog?
Thanks, Eran.
android:mimeType
as an NFC tag trigger. – CommonsWare