Open custom application based on URL

I want to open the application if URL

for example, if a person opens: http://www.example.com/id=100,I would like to parse example.comand show the parameters to open it in my application.

The same functionality is used by youtube, if you click on the YouTube link, it will ask if you want to open it with youtube or directly play youtube video.

+5
source share
2 answers

You can add data specificationintentions to your filter using the http scheme and the domain that you want to open using your application.

<intent-filter ... >
    <data android:scheme="http" android:host="example.com" />
    ...
</intent-filter>
+7
source
Intent LaunchIntent = getPackageManager().getLaunchIntentForPackage("com.package.address");
startActivity(LaunchIntent);
+1
source

All Articles