如何在Android Studio中使用NFC实施Google即搜即得应用 [英] how to implement google instant app with NFC in android studio

查看:263
本文介绍了如何在Android Studio中使用NFC实施Google即搜即得应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆