You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Android 15(API 35)中UriRelativeFilterGroup在Intent-Filter内不生效问题求助

Android 15(API 35)中UriRelativeFilterGroup在Intent-Filter内不生效问题求助

各位好,我现在在Android 15设备上做开发,目标API版本是35,本来以为新出的UriRelativeFilterGroup特性应该能正常工作,但遇到了问题,想请教下大家。

我给Launcher Activity配置的intent-filter是这样的:

<intent-filter android:autoVerify="true">
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data android:host="example.com" android:pathPrefix="/faq" android:scheme="https" />
    <uri-relative-filter-group android:allow="false" tools:targetApi="35" >
        <data android:query="ignoreapp" />
    </uri-relative-filter-group>
</intent-filter>

我预期的效果

  • 点击https://example.com/faq这个链接时,应该直接打开我的App
  • 点击带ignoreapp查询参数的https://example.com/faq?ignoreapp时,不要打开App,而是跳转到浏览器打开

实际遇到的问题

不管链接里有没有ignoreapp这个查询参数,点击后都会直接打开我的App,完全没起到过滤的作用。

有没有大佬能帮我找找我哪里配置错了呀?

内容来源于stack exchange

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.08 09:34:35