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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With