https方案的Android意向过滤器不工作
我知道这个问题可能与其他类似的问题重复出现。我已经检查了所有这些,但仍然无法解决此问题 我想在单击网页上的链接时启动我的android应用程序。当我使用自定义方案时,它可以按需要工作:https方案的Android意向过滤器不工作,android,android-intent,intentfilter,Android,Android Intent,Intentfilter,我知道这个问题可能与其他类似的问题重复出现。我已经检查了所有这些,但仍然无法解决此问题 我想在单击网页上的链接时启动我的android应用程序。当我使用自定义方案时,它可以按需要工作: <!-- In the deployed webpage: --> <a href="test://test.com">Launch application </a> <!-- The Intent filter: --> <intent-filter>
<!-- In the deployed webpage: -->
<a href="test://test.com">Launch application </a>
<!-- The Intent filter: -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="test" android:host="test.com" />
</intent-filter>
浏览器尝试打开(不存在)页面并忽略意图过滤器。
它不适用于http、https、ftp等
我在安卓6.0上运行应用程序,编译:最低11,目标23
似乎有些机制不允许我使用“保留”方案来启动应用程序,但我在帖子中没有看到任何与此相关的内容
你有什么线索吗?试着像这样连接两个
数据标签,删除第一个android.intent.category.DEFAULT
category,因为它在第一个intent过滤器上根本不需要,但在第二个过滤器上是必需的,以便
从安卓棉花糖开始,有一个新的安卓:自动验证
标志,您可以使用它来请求安卓验证某个域是否属于您,以及您是否希望在应用程序而不是浏览器中打开链接
“Android 6.0(API级别23)及更高版本允许应用程序指定
自身作为给定链接类型的默认处理程序“
请参阅:您是否可以编辑您的问题,并从AndroidManifest.xml文件中输入有关活动的完整xml(intent filter标记的父标记的完整内容)。我已按要求编辑了问题。但请记住,这实际上适用于任何自定义模式。只有在使用“http”或“https”时才会失败。好的,我认为这是问题的根源。我会接受答案,只要我得到这个工作。您知道app link验证是否与自签名ssl证书一起工作吗?
<!-- In the deployed webpage: -->
<a href="https://test.com">Launch application </a>
<!-- The Intent filter: -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="https" android:host="test.com"/>
</intent-filter>
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="https" android:host="test.com" />
</intent-filter>
</activity>