我有 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.json
和 https://content.domain.com.com/.wll-known 进行访问/assetlinks.json
。应使用 https 来验证您的域。
干杯
关于deep-linking - 是否可以使用动态链接从 2 个不同的域链接到同一个应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48379359/