Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android: Detect if App was downloaded from market

I've got an app which I would like to distribute through the market place and also from my own site. How do I, using only one build and one key, check to see if the app was downloaded from the market place or not?

This question is answered by having the code signed with different keys, but we ideally want a single build.

like image 555
Martyn Avatar asked Oct 08 '10 11:10

Martyn


People also ask

How do you tell if an app has been downloaded before Android?

You can see all the apps you've ever downloaded on your Android phone by opening the "My apps & games" section in your Google Play Store. The apps you've downloaded are divided into two sections: "Installed" (all the apps currently installed on your phone) and "Library" (all the apps that aren't currently installed).

Is there a way to see when an app was installed?

Navigate to APPS and select the app u want by long press. And then hit the Info button on top right corner. Thats it , it will show u the modified or installed time.


2 Answers

packageManager.getInstallerPackageName(context).equals("com.google.android.feedback")

http://developer.android.com/reference/android/content/pm/PackageManager.html#getInstallerPackageName(java.lang.String)

like image 126
Andy McSherry Avatar answered Nov 15 '22 09:11

Andy McSherry


It seems that this can't be done.

like image 38
Martyn Avatar answered Nov 15 '22 10:11

Martyn