Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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>
like image 251
Harry Muscle Avatar asked Sep 01 '11 22:09

Harry Muscle


1 Answers

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)

like image 64
vmatyi Avatar answered Nov 16 '22 00:11

vmatyi