Android: determine if an application has been downloaded from the market

I have an application that I would like to distribute through the market, as well as from my own site. How can I, using only one assembly and one key, check whether the application has been downloaded from the market or not?

He answers this question that the code is signed with different keys, but we ideally want one assembly.

+5
source share
5 answers

It seems that this cannot be done.

+1
source

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

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

+3

Android 1.5 , Market, " " Market App, , . , Android 2.x.

+1

I don’t know if this really correlates or not, but if you can read /data/system/packages.xml, there seems to be installer = "com.google.android.feedback" in the application market, while those which are linked to the build system and compiled locally.

0
source

All Articles