Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to detect if app was installed with Market or not?

Tags:

I am wondering if I am able to detect if my application was installed with Android Market (it's in the download list of the Market and eligible for update checks) or it's not?

It would be a very good point to detect if the app has been installed without, as that can mean it was stolen and installed from SDcard.

like image 318
Pentium10 Avatar asked Jul 05 '10 08:07

Pentium10


People also ask

How do you know if an app has been installed?

On your Android phone, open the Google Play store app and tap the menu button (three lines). In the menu, tap My apps & games to see a list of apps currently installed on your device.

How do you check if an app is installed and uninstalled?

Open the Google Play app on your Android phone or tablet, and tap on the menu button (the three lines that show up in the upper left corner). When the menu is revealed, tap on "My apps & games." Next, tap on the "All" button, and that's it: you'll be able to check all your apps & games, both uninstalled, and installed.

How do you know if I have installed an app before?

Go to google play store. click on my apps and games. The it will show you installed apps. Swipe right or click on the all applications option, there you will see all apps you have installed till now.


1 Answers

In your activity do

 PackageManager pm = getPackageManager(); String installationSource = pm.getInstallerPackageName(getPackageName()); 

installationSource will now hold the package name of the app that installed your app.

testing with an app of mine installation source is "com.google.android.feedback" when installed via google market, null if installed via debugger.

like image 123
P.Melch Avatar answered Oct 19 '22 23:10

P.Melch