6

I would like to detect the app installation source.

We can use two approaches on Android to detect the installation source: PackageManager#getInstallerPackageName(String) or PackageManager#getInstallSourceInfo(String). Both of those calls will return a package name of the installer application. For example:

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

My question is, what does this method returns for applications installed from Huawei AppGallery?

zhangxaochen
  • 32,744
  • 15
  • 77
  • 108
Metehan Toksoy
  • 1,885
  • 3
  • 22
  • 39

1 Answers1

5

You can check "com.huawei.appmarket" using the same method.

Arda Kazancı
  • 8,341
  • 4
  • 28
  • 50