我从android中创建了一个深度链接,我将assetlinks.json文件上传到主机上的.
在android深层链接构建工具上,每件事都是可以的,但是当我点击我的网站上的链接时,它不会打开应用程序。我的深层链接配置如下:
<activity
android:name=".activities.OrdersActivity"
android:screenOrientation="portrait">
<tools:validation testUrl="https://myhost.com/cart/success" />
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="https"
android:host="myhost.com"
android:pathPrefix="/cart/success" />
</intent-filter>
</activity>我试过的网址是这个
https://myhost.com/cart/success?Authority=000000000000000000000000000000074139&Status=OK发布于 2018-06-07 15:03:26
你的代码看上去很好。你在哪个应用程序中点击了链接?他们可能会阻塞deeplinks,并在应用程序中用自定义选项卡库打开它们。
您可以通过执行以下亚行shell命令来尝试deeplinks:
am start -a android.intent.action.VIEW -d "https://myhost.com/cart/success?Authority=000000000000000000000000000000074139&Status=OK"为了实现deeplinks,您不需要将assetlinks.json文件上传到.wellknown文件夹。这是苹果需要的。applink和deeplink的不同之处在于,深链接需要用户批准才能启动应用程序,而应用程序则是自动启动的。
有关更详细的解释,请参阅下面的文章。
https://stackoverflow.com/questions/50744144
复制相似问题