In your activity do
PackageManager pm = getPackageManager ();
String installationSource = pm.getInstallerPackageName (getPackageName ());
installationSource will now contain the name of the application package that installed your application.
testing with the application of the mine installation source - "com.google.android.feedback" when installing through the google market, null if installed through the debugger.
P.Melch Apr 29 '11 at 2:35 a.m. 2011-04-29 14:35
source share