1

我正面临一个与深层链接有关的特定问题。我的意思是,对于通用链接,我有类似的东西

https://www.website.com/LANGUAGE/dashboard/profile

这意味着语言可以/en/ /fr/ /de/ /it/ /es/...

问题是我在 Manifest 中尝试:

<intent-filter android:label="@string/app_name">
    <action android:name="android.intent.action.VIEW" />

    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />

    <data
         android:host="www.website.com"
         android:scheme="https"
         android:path="/*/dashboard/profile"/>

</intent-filter>

*不起作用。请问有什么解决办法吗?

4

2 回答 2

1

据我所知,Android 不支持深度链接的多语言功能。因此,您需要为每种语言设置一个唯一的 URL 路径,例如:

<data
         android:host="www.website.com"
         android:scheme="https"
         android:path="/en/dashboard/profile"/>
于 2020-01-21T11:23:18.497 回答
1

事实上,它可能通过做这样的事情:

<data
     android:host="www.website.com"
     android:scheme="https"
     android:path="/.*dashboard/profile"/>

它适用于所有语言

https://www.website.com/en/dashboard/profile
https://www.website.com/fr/dashboard/profile
https://www.website.com/de/dashboard/profile
https://www.website.com/it/dashboard/profile
https://www.website.com/es/dashboard/profile
于 2020-01-27T10:37:03.027 回答