Launch Android app from Browser using Uri of Launch Intent

Ever wondered, How do we launch application from Browser? For applications already installed in your device, if you visit eCommerce like amazon, ebay or entertainment website they will show you link to navigate to application or continue with browser.


 

[su_button url=”https://github.com/androidsrc/LaunchAppFromUrl” target=”blank” style=”stroked” background=”#51d461" color=”#ffffff” size=”6" center=”yes” radius=”0" icon=”icon: arrow-circle-o-down”]Download Full Source Code[/su_b[/su_button]p> 

If we launch app at some later stage, they will resume same display category or video resumed from last running time. We will check it with sample application.

After creating and installing sample application in your device, Click following link. Click here to launch sample app It will launch sample application.

Create a new application with package name “com.androidsrc.openappfromurl”. Activity layout will have a textview which will show text retrieved from values passed from Uri.

Edit your application manifest file, add a new IntentFilter to your activity with action as “com.androidsrc.launchfrombrowser” and define category to be default and browseable. Final AndroidManifest.xml will be as below.

You may also like...

3 Responses

  1. Manohar Perepa says:

    Is it possible if the application is not installed then can we redirect to playstore from the browser itself using the above code

  2. Lada says:

    Thank you very much! :]

  1. February 4, 2017

    […] I want to launch my custom android app from my web app on browser. I have followed the article here http://androidsrc.net/launch-android-application-from-browser-using-uri/. And it worked, I successfully trigger my app when web app user will click on link. The problem is […]

Leave a Reply

Your email address will not be published. Required fields are marked *