Android意图过滤器路径模式不起作用
我有以下链接要触发我的活动: http://mypage.com/custom-description-text-with-some-random-numbers-a21-id20683066.html 和目的过滤器:Android意图过滤器路径模式不起作用,android,android-intent,intentfilter,Android,Android Intent,Intentfilter,我有以下链接要触发我的活动: http://mypage.com/custom-description-text-with-some-random-numbers-a21-id20683066.html 和目的过滤器: <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name=
<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="mypage.com"
android:pathPattern=".*-id.*.html"
android:scheme="http" />
</intent-filter>
不幸的是,这个意图行不通。有人知道为什么吗?你能粘贴代码中负责准备意图的部分吗?我只是点击gmail中的链接。它只显示浏览器。我认为这描述了您的问题。最简单的解决方案是删除pathPattern并检查Uri在您的活动中是否具有正确的模式,但这取决于您的应用程序要求。