UNPKG

react-native-android-app-checker

Version:

A React Native plugin for checking if specific Android apps/packages are installed on the device.

12 lines (9 loc) 312 B
import { NativeModules, Platform } from 'react-native'; const { AppChecker } = NativeModules; export const isAppInstalled = (packageName) => { if (Platform.OS === 'android') { return AppChecker.isAppInstalled(packageName); } else { throw new Error('App checking not supported on iOS yet.'); } };