I installed the NXP TagWriter and NFC TagInfo on Nexus S, the same device used for the development of NFC applications. The problem is that my application does not appear in the "Complete action using" dialog after reading the tag, only those installed from the market. After some debugging, I tried using a demo application and the result was the same. What am I missing here? Should applications be installed from the market in order to properly configure intent filters?
Update
My filter intent was just
<intent-filter> <action android:name="android.nfc.action.TAG_DISCOVERED" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter>
I tried to add others, as indicated in the manual , one by one, and also all together without success. Could this have anything to do with the mime type?
When an NFC tag is read, only these two lines are associated with the action and nothing else.
INFO/ActivityManager(111): Starting: Intent { act=android.nfc.action.TECH_DISCOVERED flg=0x10000000 cmp=com.nxp.nfc.tagwriter/.activities.DashboardActivity (has extras) } from pid 197 INFO/ActivityManager(111): Starting: Intent { cmp=com.nxp.nfc.tagwriter/.activities.ConfirmLicenseActivity } from pid 6250
If you see android.nfc.action.TECH_DISCOVERED , I added the following filter intent:
<intent-filter> <action android:name="android.nfc.action.TECH_DISCOVERED" /> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> <meta-data android:name="android.nfc.action.TECH_DISCOVERED" android:resource="@xml/nfc_tech_filter" />
And res/xml/nfc_tech_filter.xml contains
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <tech-list> <tech>android.nfc.tech.IsoDep</tech> <tech>android.nfc.tech.NfcA</tech> <tech>android.nfc.tech.NfcB</tech> <tech>android.nfc.tech.NfcF</tech> <tech>android.nfc.tech.NfcV</tech> <tech>android.nfc.tech.Ndef</tech> <tech>android.nfc.tech.NdefFormatable</tech> <tech>android.nfc.tech.MifareClassic</tech> <tech>android.nfc.tech.MifareUltralight</tech> </tech-list> </resources>
source share