Gajus
Gajus

Reputation: 73758

How to check if user has an app installed?

I have requirement to detect whether user has installed a specific app, either iOS or Android. Is there a web API to detect whether user has installed a specific app? This concerns only mobile devices.

Upvotes: 1

Views: 8785

Answers (5)

sunderls
sunderls

Reputation: 783

Here are the steps that maybe worth you trial

First there must be a scheme for the app

on webpage load, add a iframe to open the scheme.(or android's intent string). At the same time, setTimeout(0.2 second) for the things you wanna do if app is no installed.

===== here is the how it works:

  1. if the app is installed, then it reacts to the scheme, and open itself. And the browser is not active, so it pauses there, and block the setTimeout

  2. if the app is not installed, then after 0.2s, the function you desire will be triggered.

notice that some little problems may occur, but I think it is acceptable

Upvotes: 0

Mert Buran
Mert Buran

Reputation: 3017

Even native apps can't get the list of installed apps on iOS, maybe you can give this a try but it won't do good to a proper App Store app. I haven't tried it yet but the idea seems fair enough to me.

You should use PackageManager of Android somehow in order to get the list on Android. AFAIK making use of PackageManager with a Web API is not possible.

Upvotes: 0

ajh158
ajh158

Reputation: 1467

Does the app have a known scheme associated with it?

If so, you can do something like this. It's ugly, but I think that's all you can do.

Upvotes: 1

MrCameronnewton
MrCameronnewton

Reputation: 1

Try Android Lost (Download from Google Play)

Then Login to the Web API and you can Check weather a app is installed

Upvotes: 0

CommonsWare
CommonsWare

Reputation: 1006584

Is there a web API to detect whether user has installed a specific app?

On Android, fortunately, no, for blindingly obvious privacy and security reasons.

Hopefully, the answer is the same for iOS and any other mobile OS.

Upvotes: 1

Related Questions