deep-linking - 是否可以使用动态链接从 2 个不同的域链接到同一个应用程序?

标签 deep-linking firebase-dynamic-links firebase-app-indexing

我有 2 个域和一个应用程序,但会通过深层链接从两个域链接到应用程序页面。

是否可以从 e 链接? G。 static.domain.com 和 content.domain.com 都进入具有动态链接的同一个应用程序吗? 预先感谢:)

最佳答案

当然,您可以添加任意数量的域。 只需在 list 中添加您的域即可。

<data android:host="static.domain.com" android:scheme="http"/>
<data android:host="static.domain.com" android:scheme="https"/>
<data android:host="content.domain.com" android:scheme="http"/>
<data android:host="content.domain.com" android:scheme="https"/>

所以,代码如下所示:

<intent-filter>
    <action android:name="android.intent.action.VIEW"/>
    <category android:name="android.intent.category.DEFAULT"/>
    <category android:name="android.intent.category.BROWSABLE"/>
    <data android:host="static.domain.com" android:scheme="http"/>
    <data android:host="static.domain.com" android:scheme="https"/>
    <data android:host="content.domain.com" android:scheme="http"/>
    <data android:host="content.domain.com" android:scheme="https"/>
</intent-filter>

不要忘记通过在 .wellknown 文件夹中添加 assetlinks.json 来验证您的域。确保可以使用 https://static.domain.com/.wll-known/assetlinks.jsonhttps://content.domain.com.com/.wll-known 进行访问/assetlinks.json。应使用 https 来验证您的域。

干杯

关于deep-linking - 是否可以使用动态链接从 2 个不同的域链接到同一个应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48379359/

相关文章:

ios - 无法在 iOS 上与 Chrome 深度链接

android - App Indexing 和 Deep Linking 有什么区别?

Firebase 动态链接子域配置

ios - Firebase 和 iOS 14 > 动态链接跟踪和事件是否会继续有效?

ios - 是否不再需要 GSDAppIndexing SDK?

android - 如何通过Android应用中的链接重定向到youtube应用?

android-studio - 如何使测试应用程序链接起作用

Firebase 动态链接。如何删除 page.link 的自定义子域

android - 如何验证 App Indexing 实现?