react-native-installer-package-name
Installation
npm:
npm install react-native-installer-package-name --save
Yarn:
yarn add react-native-installer-package-name
Usage
import InstallerPackageName from 'react-native-installer-package-name';
InstallerPackageName.getInstallerPackageName((response) => {
console.log(response);
});
Note
iOS: It will always return com.apple.MobileStore
.
Android: * null - developer * com.android.vending - google play * com.amazon.venezia - amazon app * com.sec.android.app.samsungapps - samsung app store * com.huawei.appmarket - huawei app gallery
UNKNOWN SOURCE: If platform is not iOS or Android.