开发者

Match HTTP parameters in URL with Android Intent Filters

I'm trying to put 开发者_运维知识库together an intent filter to start my application when a certain HTML URL is accessed in the browser. I have no problems doing so when it's a standard url, like www.stonyx.com for example.

However, I need to match an URL with HTTP parameters like www.stonyx.com/?pagename and it's the part after the ? that I'm having trouble matching.

I've tried using android:path, android:pathPrefix, and android:pathPattern, and none of them seem to do it for me ... not sure if it's cause I'm doing something wrong or if it's just because it's a php path with a question mark. Any help is highly appreciated.

P.S. Here's what my intent filter looks like at the moment

<intent-filter>
  <action android:name="android.intent.action.VIEW"></action>
  <category android:name="android.intent.category.DEFAULT"></category>
  <category android:name="android.intent.category.BROWSABLE"></category>
  <data android:host="www.megaupload.com" android:scheme="http"></data>
</intent-filter>


You can't. :(

according to http://developer.android.com/guide/components/intents-filters.html :

Each element can specify a URI and a data type (MIME media type). There are separate attributes — scheme, host, port, and path — for each part of the URI:

scheme://host:port/path

no parameters or query strings. (thus, the part after the ? mark is simply not matched against anything)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜