installerPackageName function

Future<String?> installerPackageName()

The package name of the app/store that installed this app on the device (Android only).

Common values:

  • com.android.vending — Google Play Store
  • com.sec.android.app.samsungapps — Samsung Galaxy Store
  • com.amazon.venezia — Amazon Appstore
  • null — sideloads (ADB, direct APK, AirBuild OTA installs), preloaded apps, emulators, and every non-Android platform

The result is cached for the lifetime of the process — the installer of a running app cannot change.

Implementation

Future<String?> installerPackageName() {
  if (!Platform.isAndroid) return Future<String?>.value();
  return _cachedInstaller ??= _lookupInstaller();
}