java - android intent-filter <data> is not working correctly -


i trying have application intercept on specific url in browser. following code in manifest:

<activity             android:name="com.myactivity.rootactivity">             <intent-filter>                 <action android:name="android.intent.action.main" />                  <category android:name="android.intent.category.launcher" />             </intent-filter>             <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="subdomian.maindomain.com" />              </intent-filter>         </activity> 

it working fine @ moment, when open link http://subdomain.maindomain.com/ , dialog comes activity listed on it.

but when add android:path in intent-filter below, stops working, doesn't work simple url without path.

<activity             android:name="com.myactivity.rootactivity">             <intent-filter>                 <action android:name="android.intent.action.main" />                  <category android:name="android.intent.category.launcher" />             </intent-filter>             <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="subdomian.maindomain.com" />                 <data android:path="mypath" />              </intent-filter>         </activity> 

am doing wrong here?

i tested said using these links , working me

<data android:scheme="http" /> <data android:host="developer.android.com" /> <data android:path="/guide/topics/manifest/data-element.html"/> 

and intent used is

intent browserintent = new intent(     intent.action_view,     uri.parse("http://developer.android.com/guide/topics/manifest/data-element.html")); startactivity(browserintent); 

the android:path must match after host url gave work ? can specify url did use ? read this link help


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

c++ - End of file on pipe magic during open -