Start an Android app/intent from an NFC tag?

前端 未结 3 1258
难免孤独
难免孤独 2020-12-08 21:06

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 w

相关标签:
3条回答
  • 2020-12-08 21:33

    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

    0 讨论(0)
  • 2020-12-08 21:40

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

    0 讨论(0)
  • 2020-12-08 21:54

    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).

    0 讨论(0)
提交回复
热议问题