How can we redirect the users to play store if app is not install on device or install launch the app?

I am using cordova QR-reader plugin. I have a web page which have a button if user click on that button mobile browser will check my QR-Code application. is it install on device? then it will launch otherwise they will redirect to play store for download the app. So anybody give some suggestion or help thanks in advance.

That is possible with custom urls!

See here: https://github.com/EddyVerbruggen/Custom-URL-scheme

There you can set your “app”-url. like ‘myapp://’ -> then your app will start, if you call this url in a browser our click in anywhere else on a link with that “prefix” the system will try to open your file.

Try it and if you get that step working you can ask again :wink:

So we can do it step by step.

greets

2 Likes

thank you bengtler for response.

But if my QR-Code app is not install on device so how can we redirect users to play store? For installing my app

Like described here:

you can try to call another function with a timeout -> so you redirect to the store after 500ms or 300ms.

If the app is installed the app is opened and if not -> you see your browser redirecting to the store

its working but when i click on button it shows me error page and when i click on back button on my device it redirect me to store. so how can it possible it will redirect me direct on play store if app is not install…

any other suggestion because the above solution is not working for me …