如何在Android Studio中使用NFC实施Google即搜即得应用 [英] how to implement google instant app with NFC in android studio
问题描述
我想在android studio中点击nfc标签时运行即时应用程序.目前,我的简单即时应用程序在调用NFCAdapter时崩溃.
i want to run instant app when tapping nfc tag in android studio. currently my simple instant app is crash when calling NFCAdapter.
推荐答案
Instant Apps当前无法访问NFC硬件.可以在此处,您会看到 android.permission.NFC
不支持.
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.
如果要在点击NFC标签时触发Instant App,如果将启用了Instant App的URL绑定到标签上,则应该可以使用.当访问该标签并由系统打开URL时,Instant App应该触发.
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.
这篇关于如何在Android Studio中使用NFC实施Google即搜即得应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!