Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android深度链接模式:匹配http和https_Android_Android Manifest_Deep Linking - Fatal编程技术网

Android深度链接模式:匹配http和https

Android深度链接模式:匹配http和https,android,android-manifest,deep-linking,Android,Android Manifest,Deep Linking,我希望我的应用程序在http://www.example.com和https://www.example.com 这项工作: <data android:host="www.example.com" android:path="/" android:scheme="http"/> <data andro

我希望我的应用程序在
http://www.example.com
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"/>

是否可以用一个条目同时捕获这两个条目?我试过:

            <data
                android:host="www.example.com"
                android:path="/"
                android:scheme="http*"/>

但这只捕获http链接,而不是https链接


因此,我知道如何处理bot变体,但希望尽可能使用最简洁的文字

您可以使用separate
来处理这两个问题

<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="www.example.com"
            android:path="/"
            android:scheme="http"/>     
</intent-filter>
<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="www.example.com"
            android:path="/"
            android:scheme="https"/>     
</intent-filter>

这似乎对我很有帮助:

<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:scheme=“https?”
这也可以工作:
这是我想要避免的,我想拥有最短的可能性(在清单中的字符数)。有时你无法避免,除非你要更改操作系统编码:)我已经添加了,但我的应用程序仍然没有上传