There are many answers on stackoverflow showing how a lauch application is from a web browser, but I'm not sure what went wrong with my code, which never seems to do the intended thing. I am trying to run my application at a URL from any other application such as a web browser, initially my manifest file looks like this:
<activity android:name=".Main">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<data android:scheme="http" android:host="ebay.com" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
And when I typed http://ebay.com in a browser that never launched my application. Obviously, how does the browser know about my application ?, then I tried the other way around and added another action called MyActivity and changed the manifest file as
<activity android:name=".Main">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MyActivity">
<intent-filter>
<data android:scheme="http" android:host="ebay.com" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
startActivity ( Intent (Intent.ACTION_VIEW, Uri.parse( "http://mycityway.com" )));
, . Activity, .
, . , . , .