Start an Android app/intent from an NFC tag?-ThrowExceptions

Exception or error:

On an Android device equipped with NFC reader hardware, is there any in-built support to use the NFC tag contents to fire off an intent (e.g. starting an app)? I am asking whether the support is there by default, I know I could build my own app to listen for NFC events and handle them.

All the NFC tag writing apps I’ve seen appear to only support text/URLs/contacts, and the contacts support seems useless as many are far too big to fit in a tag.

How to solve:

According the the Android Developer site, it is possible for your app to filter NFC intents such as ACTION_NDEF_DISCOVERED.

###

This is possible with Android Application Records. You basically write the package name of the app that you want to start into your NFC tag and when a device scans it, it will do its best to open the application. If its not there, it will take you to Market to download it. This is only available to 4.0 devices and up.

See this dev guide:
https://developer.android.com/guide/topics/connectivity/nfc/nfc.html#aar

###

If you are not trying to program your app to do this yourself then you can use a 3rd party app. Such as “Trigger” (I believe it used be called NFCTasker or something like that).

You can use that to read from tags and write to tags. You can create various actions including launch an app (others include changing volume, toggling wifi, text to speech, sending messages, etc).

Leave a Reply

Your email address will not be published. Required fields are marked *