Android深层链接架构:同时匹配http和https [英] Android deep linking schema: match both http and https
本文介绍了Android深层链接架构:同时匹配http和https的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望我的应用程序在http://www.example.com
和https://www.example.com
上打开.
I want my app to open on http://www.example.com
and https://www.example.com
.
这有效:
<data
android:host="www.example.com"
android:path="/"
android:scheme="http"/>
<data
android:host="www.example.com"
android:path="/"
android:scheme="https"/>
是否可以同时捕获两个条目?我尝试过:
Is it possible to catch both with one entry? I tried:
<data
android:host="www.example.com"
android:path="/"
android:scheme="http*"/>
,但这仅捕获http链接,而不捕获https链接.
but this catches only the http link, not the https one.
因此,我知道如何处理机器人变体,但希望使用最简洁的文字.
So I know how I can handle bot variants, but want to use the most concise writing possible.
推荐答案
这似乎对我有用:
<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:scheme="http" />
<data android:scheme="https" />
<data android:host="www.mywebsite.com" />
<data android:pathPrefix="/mypage.php" />
</intent-filter>
这篇关于Android深层链接架构:同时匹配http和https的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文