react-native-package-installer
v0.3.0
Published
test
Downloads
5
Maintainers
Readme
Key Features
- Install any package on Android with a single line of code
- Silent install with admin privileges
Installation
npm install react-native-package-installer
How To Use
Android
To install the app silently, you need admin priviledges
To enable admin you need to run:
adb shell dpm set-device-owner com.packageinstallerexample/com.packageinstaller.MyDeviceAdminReceiver
To remove admin instead do:
adb shell dpm remove-active-admin com.packageinstallerexample/com.packageinstaller.MyDeviceAdminReceiver
Change com.packageinstallerexample
to your bundle id
You can also make your own admin receiver, you can check the code for Android for this package as reference
The APK you want to install needs to be in the cache folder, check the example project for an implementation using the Expo SDK
import { install } from 'react-native-package-installer';
// ...
await install('/path/to/apk');
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
genesisxyz.dev · GitHub @genesisxyz · Twitter @thedummyxyz