Android installation source

Can I get the installation source from the application Android?

I want to say that I want to see if the application is installed from Play Store, Amazon Appstoreor using the APK.

PS: I think to see this while my application crashes, and I was able to send an error report that my application was installed through Play Store. How to get this value?

+4
source share
2 answers

The PackageManager class provides the getInstallerPackageName method , which tells you the name of the package for any package you have installed. Side applications will not contain values.

Amazon PackageManager.getInstallerPackageName() "com.amazon.venezia", Google Play "com.android.vending".

: , Google ? : getInstallerPackageName

+6

getInstallerPackageName.

, .

  • Google Play: "com.android.vending"
  • Amazon Appstore: "com.amazon.venezia"
+2

Source: https://habr.com/ru/post/1537840/


All Articles