Tag Archives: NDEF_DISCOVERED

Launch an Android Application/Activity when URL are read from NFC tag

What a long title to a simple and really easy system.

But It took me some minutes to find how to manage to open my application activity when a nfc tag is read with a particular url.

Here is the trick :
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<data
android:host="google.com"
android:scheme="http" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>

put this between <activity></activity> to tell to the system that the activity can hold the http://*.google.com/* and should start it by default

It will also override the internet browser 😉