我想过滤特定的 URL:http://gaapa.cz/mobile/*
但是这个过滤器会在每个 URl 上触发 - 这是错误的吗?
<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="gaapa.cz"
android:path="/mobile/.*"
android:scheme="http" />
</intent-filter>
你想使用路径,pathPrefix
, or pathPattern
, 根据文档在这里。
在你的情况下,要么pathPattern
or pathPrefix
将工作,
pathPattern="mobile/*"
or
pathPrefix="mobile"
但是,这并不能解释为什么您的过滤器匹配所有 URI。它应该不匹配,因为路径不理解“*”。我怀疑您的代码中其他地方添加/缺少了某些内容。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)