Reputation: 9659
I am writing an app after following the tutorial under "http://code.tutsplus.com/tutorials/reading-nfc-tags-with-android--mobile-17278".
Now the problem i am facing is that, with every tag scan instead of getting the app chooser, Google play opens up with Trigger app page.
I had previously installed Trigger app, but i don't have it installed now.
What could be done to resolve this issue, and to get the app chooser to show up.
Update:
<activity
android:name="net.vrallev.android.nfc.demo.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<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" />
</activity>
Upvotes: 1
Views: 1454
Reputation: 40851
Play Store opening up after scanning a tag is a clear indication that the tags contain an Android Application Record (AAR). A tag containing an AAR will only start the app referenced in the AAR or will open that app's Play Store page.
In order to re-use the tags, you should first format them or simply overwrite them with some other NDEF messsage that does not contain an AAR.
You could, for instance, use an app like NXP TagWriter to do that. Alternatively, you could register your actvity for the foreground dispatch system, start your activity and update the tag's NDEF message within your own app.
Upvotes: 3