【问题标题】:Is it possible to link from 2 different domains to the same app using dynamic links?是否可以使用动态链接从 2 个不同的域链接到同一个应用程序?
【发布时间】:2018-01-22 10:25:02
【问题描述】:

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

是否可以从 e 链接。 G。 static.domain.com 和 content.domain.com 都通过动态链接进入同一个应用程序? 在此先感谢:)

【问题讨论】:

  • 是的,有可能

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


【解决方案1】:

当然,您可以根据需要添加多个域。 只需在清单中添加您的域。

<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>

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

干杯

【讨论】:

    猜你喜欢
    • 2017-11-26
    • 1970-01-01
    • 2016-02-06
    • 1970-01-01
    • 2015-05-30
    • 2021-07-03
    • 1970-01-01
    • 2020-12-02
    • 1970-01-01
    相关资源
    最近更新 更多