不确定这是否可能,但希望有人有解决办法。
我正在尝试让我的Android应用程序拦截mydomain.com/abc格式的urls,而不是mydomain.com/mp3/id。
用pathPattern是否有可能排除某些路径?
<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" />
<data android:host="mydomain.com" />
<data android:pathPattern="/.*" /> />
</intent-filter>发布于 2013-10-01 02:51:40
pathPattern的工作方式更像glob,而不是regexp。如果你真的是指我的域/abc,你应该可以指定android:host="mydomain.com“android:pathPattern="abc",但我猜你的意思是
匹配mydomain.com/x
不匹配我的域/x/y
我觉得这不可能。如果是的话,它可能涉及到pathPrefix的一些使用。
https://stackoverflow.com/questions/19105078
复制相似问题