我在尝试使用IntentFilter处理下面的链接时遇到了一些问题。
http://www.fakedomain.com/clubs/players/<playerId>/<hobbies>现实生活中的一个例子是这样的:
hobby]
这是我的IntentFilter
<activity
......>
<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" android:host="www.fakedomain.com"
android:path="/clubs/players/*" />
</intent-filter>
</activity>我试着跟踪android:path's,但没有一种是可行的:
android:path="/clubs/players/.*/.*"
android:path="/clubs/players/*/*"我能够处理以下链接
http://www.fakedomain.com/clubs/players/
但是这是无用的,因为链接错过了完整的路径。
我已经阅读了一些从谷歌搜索中出现的其他例子,但我仍然无法处理这个链接,很可能我正在做一些非常愚蠢的事情。
任何帮助都将不胜感激。
发布于 2014-04-21 17:31:25
这是我的IntentFilter
android:path不接受通配符。那是android:pathPattern。无论如何,使用android:pathPrefix可能会为您提供更好的服务。
https://stackoverflow.com/questions/23202403
复制相似问题