We are creating an app where you can share an app, which sends the user to the google play store to download another app. My question is, how can I know if some user actually downloaded and installed that app? Is there a some sort of callback you get from the play store?
Asked
Active
Viewed 1,059 times
3 Answers
0
Try calling startActivityForResult() with the Play Store intent. Then, override the onActivityResult() method in your Activity and check if the app is installed. This might help: How to check programmatically if an application is installed or not in Android?

Community
- 1
- 1
0
isAppInstalledBefore("com.example.anappblabla");
private boolean isAppInstalledBefore(String packageName) {
PackageManager pm = getPackageManager();
boolean installed = false;
try {
pm.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES);
installed = true;
} catch (PackageManager.NameNotFoundException e) {
installed = false;
}
return installed; //returns boolean
}

hakki
- 6,181
- 6
- 62
- 106
-
note: This returns result of app which installed on device on that current time. But it could be useful for you. – hakki Jun 08 '15 at 18:43
0
No, but:
What I would do is trying to get the package name (generally in the URL for example: https://play.google.com/store/apps/details?id=dev.laurentmeyer.contactautocompleteview of the target app (which is unique): something like dev.laurentmeyer.whateverApp
(it's the one I'm personally using). Then scan the installed apps with this Helper and you'll be sure if it has been installed or not.

Laurent Meyer
- 2,766
- 3
- 33
- 57