I have a mobile web app (opened on Android's browser, not a native one), that redirects the user to Google's Play store (for apps install). I want to track the app install (Assuming the user opened Google Play's native app and not web Google Play) to know that I was the referrer for that install. I found a solution here and here, but they are all taking about referring to Google play from within a native Android app. Do we have a solution for tracking app install that was referred from mobile browser?
Asked
Active
Viewed 479 times
0
-
One solution I could think about is getting the referrer when installing the app ("using com.android.vending.INSTALL_REFERRER"???) and firing a pixel to our server. The problem is that I couldn't find decent documentation for that. – Yaniv Efraim Jan 29 '13 at 15:08
1 Answers
0
Since you are using the app to display the webpage, you can use the same app to get list of app installed :
Try this :
final PackageManager pm = getPackageManager();
// get a list of installed apps.
List<ApplicationInfo> packages = pm.getInstalledApplications(PackageManager.GET_META_DATA);
for (ApplicationInfo packageInfo : packages) {
if (pm.getLaunchIntentForPackage(packageInfo.packageName) != null) {
Log.d(TAG, "Installed package :" + packageInfo.packageName);
String applicationName = (String) (packageInfo != null ? pm.getApplicationLabel(packageInfo)
: "(unknown)");
Log.d(TAG, "Launch Name :" + applicationName);
}
}
So before launching the play you can maintain a list of all application that are present. And then it returns to your app you can again scan and check if the app was installed.
or you can implement

Nimish Choudhary
- 2,048
- 18
- 17
-
maybe I did not make myself clear. My app is a website. It is not on a native app or a webview. It is a website opened on a regular mobile browser. What you refer to is a native app with a webview, which is not the case – Yaniv Efraim Jan 29 '13 at 14:01