我想通过 NFC 打开一个即时应用程序。
我的 AndroidManifest.xml 文件中有类似下面的内容:
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
<data android:scheme="http" />
<data android:host="example-refresh.herokuapp.com" />
</intent-filter>
从链接点击进入 https://example-refresh.herokuapp.com(示例链接)时,即时应用程序可以正确加载。 但是,从nfc标签打开该链接时,浏览器只会加载。 我还尝试了让nfc打开AAR (https://developer.android.com/guide/topics/connectivity/nfc/nfc.html#aar),这将导致在未安装应用程序时打开Play商店链接,并且在已安装应用程序时从nfc中正确打开应用程序。 如果我在nfc上放置其他内容以显示二义性选项,则可以选择浏览器选项中的即时应用程序,但我想让它默认为即时应用程序。
有什么我错过的东西可以使nfc标签加载即时应用程序吗? 我还尝试使用branch,但没有成功。