i want to run instant app when tapping nfc tag in android studio. currently my simple instant app is crash when calling NFCAdapter.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Instant Apps cannot currently access NFC hardware. The list of permissions supported by Instant Apps can be found here and you can see that the android.permission.NFC
is not supported.
If you want to trigger your Instant App when a NFC tag is tapped, that should work if you tie an Instant App-enabled URL to a tag. When that tag is accessed and the URL opened by the system, the Instant App should trigger instead.