genesisxyz / react-native-package-installer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-package-installer

Install any package on Android with a single line of code

npm

Key FeaturesHow To UseHow To UseContributingLicense

screenshot

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

About

License:MIT License


Languages

Language:Java 30.5%Language:Kotlin 24.0%Language:Ruby 14.9%Language:Objective-C 10.4%Language:TypeScript 7.4%Language:JavaScript 6.9%Language:Objective-C++ 4.3%Language:Swift 1.3%Language:C 0.4%