Android 6.x应用程序关联的意向过滤器问题

Android 6.x应用程序关联的意向过滤器问题,android,cordova,android-intent,Android,Cordova,Android Intent,我正在使用Intel XDK开发Cordova Phonegap应用程序,并修改AndroidManifest.xml文件,以包含一个意图过滤器,该过滤器捕获到example.com的http和https流量,并将其重定向到我的应用程序 我正在更新我的意图过滤器,我注意到旧的过滤器在Android 6.0.1中不能正常工作 它一直在安卓5.x的旧版本中工作 <intent-filter> <action android:name="android.intent.acti

我正在使用Intel XDK开发Cordova Phonegap应用程序,并修改AndroidManifest.xml文件,以包含一个意图过滤器,该过滤器捕获到example.com的http和https流量,并将其重定向到我的应用程序

我正在更新我的意图过滤器,我注意到旧的过滤器在Android 6.0.1中不能正常工作

它一直在安卓5.x的旧版本中工作

<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"
            android:host="example.com" 
            android:pathPrefix="" />
    <data
            android:scheme="http"
            android:host="www.example.com" 
            android:pathPrefix="" />
    <data
            android:scheme="https"
            android:host="example.com" 
            android:pathPrefix="" />
    <data
            android:scheme="https"
            android:host="www.example.com" 
            android:pathPrefix="" />

“我不再被提示将该url与该应用程序关联,但是,它确实要求关联,一旦关联发生,http和https流量都将定向到该应用程序

问题是当我使用http时,提示没有出现

这里有两个我尝试过的过滤器变体,都有相同的问题(包括我更新的功能)


而且

<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" android:host="*example.com" path="" />
    <data android:scheme="http" android:host="*example.com" path="/" />
    <data android:scheme="http" android:host="*example.com" path="/app" />
</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="https" android:host="*example.com" path="" />
    <data android:scheme="https" android:host="*example.com" path="/" />
    <data android:scheme="https" android:host="*example.com" path="/app" />
</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"
            android:scheme="https"
            android:host="*example.com"
            android:path=""
            android:path="/"
            android:pathPrefix="/app" 
        />
</intent-filter>


您好!我也遇到了类似的问题。在中,我发现您有重复的属性。这是为您编译的吗?在我的例子中,它标记了一个错误,因为方案和路径是重复的。对于我来说,使用“英特尔XDK”进行构建很好。它的性能与预期一样,您可能需要更新正在使用的任何构建过程。感谢您的回复!
<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"
            android:scheme="https"
            android:host="*example.com"
            android:path=""
            android:path="/"
            android:pathPrefix="/app" 
        />
</intent-filter>