How to detect in javascript that an app is installed in the Android device or not?

Hi Friends,
Please help me for the below query.

How to detect in javascript that an app is installed in the Android and ios devices or not?

Thanks in advance!!
Priya

I can’t imagine that there’s any possible way to know what you’re wanting to know via JavaScript, even in our privacy-less world. Most sites I’ve seen that link to apps link to the app, and if the app doesn’t exist, you’re redirected to the store, I think?

1 Like

I’m not sure if it would work, but you might be able to exploit a quirk with Chrome (and possibly Safari) wherein if you visit a specific URL it actually opens up the App Store if you don’t have the app installed. You can then check if the page was visited (user doesn’t have it installed) or if nothing was returned (the app was loaded).

A non invasive method might be, for example, if you visit this link on an android device which opens up the Google Chrome app page (I’ve encoded it so you can see the link structure):

https://play.google.com/store/apps/details?id=com.android.chrome&hl=en&referrer=utm_source%3Dgoogle%26utm_medium%3Dorganic%26utm_term%3Dchrome+store&pcampaignid=APPU_MHdmVNvbDbOOsQSrlYLADw

Chrome on Android will actually open up the PlayStore app. I haven’t tested it, but you might be able to retrieve the HTML for that page via AJAX that contains the text “Installed” or “Install”:

That’s totally theoretical though.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.