A lightweight React Native library to manage and enable the 'Install Unknown Apps' permission on Android devices. Ideal for apps that need to install APK files from external sources.
Using npm:
npm install react-native-install-unknown-apps
Using yarn:
yarn add react-native-install-unknown-apps
import {
checkAppInstallPermission,
requestAppInstallPermission,
} from 'react-native-install-unknown-apps';
// Check if the app can request install packages permission
const checkPermission = async () => {
const hasPermission = await checkAppInstallPermission();
if (!hasPermission) {
await requestAppInstallPermission();
}
};
checkPermission();
- Returns:
Promise<boolean>
- Checks if the app has permission to install unknown apps.
- Opens a permission dialog to request install unknown apps permission.
- Android (API level 26+)
- Not supported on iOS
Watch the demo video to see the library in action:
MIT
Made with ❤️ by [Aravind] 🚀