android – Launch App or Play Store by scanning QR code

android – Launch App or Play Store by scanning QR code

You could create a URL which would be recognized by your app, and would open it automatically (you can declare these in your manifest).
You could make that page display something like Redirecting you to Google Play…, and then redirect in a few seconds.

So if they have the app installed, the URL would trigger opening it, if it is not opened, it would stay in the browser and redirect to Google Play.

This is the solution Ive found for the same issue:
1. Ive created a simple http landing-page with 2 badges, the 1st for Google-play android app and the 2nd for the Apple App Store app. (
2. Ive added the following lines in the manifest (as well described above):

                android_pathPrefix=/landingPage />
  1. Ive generated a QrCode from the URL You can eventually add some parameters at the end to handle in the App in the future ( ecc.).

So, when you catch the QrCode for the first time, you are directed through the browser to the landing page and can choose the app to download and install. The coming times you catch the QrCode the device show you the app list to use to execute it and you will find there the app just installed.
This works fine for me

android – Launch App or Play Store by scanning QR code

you can through a html page

    please note Android_URL like [scheme]://[host]/[path]?[query]

    scheme:which App  you  want to start
    query:Key and  value 

    Android_URL = myapp://;

    <meta http-equiv=Content-Type content=text/html; charset=UTF-8 />
    <meta content=telephone=no name=format-detection />
    <meta name=viewport content=width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0 />
        <title>open or download  App</title>

    <script src=assets/plugins/jquery-1.8.3.min.js type=text/javascript></script>

    <a id=vlink onClick=try_to_open_app() style=display:none></a>
    var browser={    
                var u = navigator.userAgent, app = navigator.appVersion;      
        var Android_URL = myapp://;

        function open_link() {
        function try_to_open_app() {
            setTimeout(open_link(), 500);
        else if({     


    android_theme=@android:style/Theme.Black.NoTitleBar >
        <action android_name=android.intent.action.MAIN />

        <category android_name=android.intent.category.LAUNCHER />

<!-- new in -->

        <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_scheme=myapp android_path=/openwith/>



    String action = getIntent().getAction();
    String uid = null;
        Uri uri = getIntent().getData();  
        if(uri != null){  
            uid = uri.getQueryParameter(uid);
    Log.d(TAG, uid);

Leave a Reply

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