gpt4 book ai didi

android - 主机是否是 Android 深度链接所需的配置?

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:48:03 25 4
gpt4 key购买 nike

我的问题就是标题:

host 是 Android 深度链接的必需配置吗?

我已将 Google Play 深层链接到这样的 uri:

“market://details?id=com.facebook.katana”他们的 AndroidManifest 有:

                    <data
android:scheme="market"
android:host="details"
android:path=""/>

但现在我需要深度链接到其他一些没有任何主机配置的应用:

这甚至可能吗?

我去看了文档(https://developer.android.com/training/app-indexing/deep-linking.html#handling-intents),我看到他们也在使用主机配置:

<activity
android:name="com.example.android.GizmosActivity"
android:label="@string/title_gizmos" >
<intent-filter android:label="@string/filter_title_viewgizmos">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with "example://gizmos” -->
<data android:scheme="example"
android:host="gizmos" />
<!-- Accepts URIs that begin with "http://www.example.com/gizmos” -->
<data android:scheme="http"
android:host="www.example.com"
android:pathPrefix="gizmos" />
</intent-filter>
</activity>

但它还说:

“至少,标签必须包含 android:scheme 属性。”

所以我想知道深度链接是否必须使用主机配置?

最佳答案

简短回答:否

任何应用程序仍然可以在不指定主机的情况下提供深度链接支持,尽管指定它更清楚。

关于android - 主机是否是 Android 深度链接所需的配置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25062815/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com