How to make application as default

kamalmjan

Member
Licensed User
Longtime User
Hi all,

Currently when I scan an RFID tag, a selection menu will pop up showing all the nfc applications installed on the droid. However, my application is not listed. I've added the following in the manifest file:
AddActivityText(main,
<intent-filter >
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain" />
</intent-filter>)

However, my application is still not listed. How do I go about resolving this problem? All hep is greatly appreciated. Thanks!

Brgds,
Kamal
 
Which value is stored in this tag?

Tag details as follows:

UID: e00401500f729374
RF technology: type V (ISO/IEC 15693/vicinity)
tag type: SL2 S2002/SL2 S2102 (ICODE SLIX)
manufacturer: NXP
DSF Id: 00
Response flag: 00
Target technology classes: android.nfc.tech.NfcV, android.nfc.tech.NgefFormatable

Thanks!

Brgds,
Kamal
 
Upvote 0
I've added the following in the manifest:
Code: Copy
AddActivityText(main, 
   <intent-filter >
      <action android:name="android.nfc.action.TAG_DISCOVERED"/>
      <category android:name="android.intent.category.DEFAULT"/>
      <data android:mimeType="text/plain" />
    </intent-filter>
    <intent-filter>
        <action android:name="android.nfc.action.TECH_DISCOVERED" />
      <category android:name="android.intent.category.DEFAULT"/>
      <data android:mimeType="text/plain" />
    </intent-filter>
   <meta-data android:name="android.nfc.action.TECH_DISCOVERED"
         android:resource="@xml/nfc_tech_filter"
    />)
AddPermission (android.permission.NFC)

And added the following res\xml\nfc_tech_filter.xml
Code: Copy
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <tech-list>
        <tech>android.nfc.tech.IsoDep</tech>
    </tech-list>
    <tech-list>
        <tech>android.nfc.tech.NfcA</tech>
    </tech-list>
    <tech-list>
        <tech>android.nfc.tech.NfcB</tech>
    </tech-list>
    <tech-list>
        <tech>android.nfc.tech.NfcF</tech>
    </tech-list>
    <tech-list>
        <tech>android.nfc.tech.NfcV</tech>
    </tech-list>
    <tech-list>
        <tech>android.nfc.tech.Ndef</tech>
    </tech-list>
    <tech-list>
        <tech>android.nfc.tech.NdefFormatable</tech>
    </tech-list>
    <tech-list>
        <tech>android.nfc.tech.MifareClassic</tech>
    </tech-list>
    <tech-list>
        <tech>android.nfc.tech.MifareUltralight</tech>
    </tech-list>
</resources>

but still my program is not listed. This is what pops up on my droid when I scan the tag:

SC20130305-175121.png


Appreciate the help. Thanks.
 
Upvote 0
Try changing this <data android:mimeType="text/plain" /> to <data android:mimeType="text/*" /> or removing that line altogether.
Or alternatively open the manifest of one of the listed apps and see what they have set as the intent filter.

Thanks buddy! It's working now. Appreciate your assistance.

Brgds,
Kamal
 
Upvote 0
Back
Top