StoreChecker
This Flutter plugin is useful to find the origin of currently installed apk/ipa.
Android: It's very common to have Android applications republished on alternate markets or their APKs made available for download. The plugin detects whether app is installed from local source or Play Store or other stores
iOS: Detects whether app is installed from TestFlight Beta or App Store build
Usage
You can use the StoreChecker to find the origin of apk/ipa. This works both on iOS and Android.
Add this to your package's pubspec.yaml file:
dependencies:
store_checker: ^1.8.0
import 'package:store_checker/store_checker.dart';
Source installationSource = await StoreChecker.getSource;
String source = "";
switch (installationSource) {
case Source.IS_INSTALLED_FROM_PLAY_STORE:
source = "Play Store";
break;
case Source.IS_INSTALLED_FROM_PLAY_PACKAGE_INSTALLER:
source = "Google Package installer";
break;
case Source.IS_INSTALLED_FROM_LOCAL_SOURCE:
source = "Local Source";
break;
case Source.IS_INSTALLED_FROM_AMAZON_APP_STORE:
source = "Amazon Store";
break;
case Source.IS_INSTALLED_FROM_HUAWEI_APP_GALLERY:
source = "Huawei App Gallery";
break;
case Source.IS_INSTALLED_FROM_SAMSUNG_GALAXY_STORE:
source = "Samsung Galaxy Store";
break;
case Source.IS_INSTALLED_FROM_SAMSUNG_SMART_SWITCH_MOBILE:
source = "Samsung Smart Switch Mobile";
break;
case Source.IS_INSTALLED_FROM_XIAOMI_GET_APPS:
source = "Xiaomi Get Apps";
break;
case Source.IS_INSTALLED_FROM_OPPO_APP_MARKET:
source = "Oppo App Market";
break;
case Source.IS_INSTALLED_FROM_VIVO_APP_STORE:
source = "Vivo App Store";
break;
case Source.IS_INSTALLED_FROM_RU_STORE:
source = "RuStore";
break;
case Source.IS_INSTALLED_FROM_OTHER_SOURCE:
source = "Other Source";
break;
case Source.IS_INSTALLED_FROM_APP_STORE:
source = "App Store";
break;
case Source.IS_INSTALLED_FROM_TEST_FLIGHT:
source = "Test Flight";
break;
case Source.UNKNOWN:
source = "Unknown Source";
break;
}
Issues and feedback
Please file issues to send feedback or report a bug. Thank you!