Android install source

前端 未结 2 1790
再見小時候
再見小時候 2021-01-06 05:34

Is it possible to get the source of install from an Android app?

I mean, I want to see, if the app is installed from the Play Store,

相关标签:
2条回答
  • 2021-01-06 05:50

    The PackageManager class supplies the getInstallerPackageName method that will tell you the package name of whatever installed the package you specify. Side-loaded apps will not contain a value.

    The latest version of the Amazon store finally sets PackageManager.getInstallerPackageName() to "com.amazon.venezia" as well to contrast with Google Play's "com.android.vending".

    Source: How to know an application is installed from google play or side-load? For an Example: getInstallerPackageName returns null

    0 讨论(0)
  • 2021-01-06 05:53

    Use getInstallerPackageName.

    This stores the packageName of what installed the application.

    • Google Play: "com.android.vending"
    • Amazon Appstore: "com.amazon.venezia"
    0 讨论(0)
提交回复
热议问题