https://github.com/jerson/react-native-updater-util
Method for open installer "apk" only **Android**
https://github.com/jerson/react-native-updater-util
Last synced: 26 days ago
JSON representation
Method for open installer "apk" only **Android**
- Host: GitHub
- URL: https://github.com/jerson/react-native-updater-util
- Owner: jerson
- Created: 2018-06-16T20:07:33.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-23T22:10:52.000Z (about 8 years ago)
- Last Synced: 2026-03-24T04:22:13.193Z (5 months ago)
- Language: Java
- Size: 9.77 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-native-updater-util
Method for open installer "apk" only **Android**
## Getting started
`$ npm install react-native-updater-util --save`
### Mostly automatic installation
`$ react-native link react-native-updater-util`
### Manual installation
#### Android
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
- Add `import me.jerson.mobile.updater.RNUpdaterUtilPackage;` to the imports at the top of the file
- Add `new RNUpdaterUtilPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
```
include ':react-native-updater-util'
project(':react-native-updater-util').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-updater-util/android')
```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
```
compile project(':react-native-updater-util')
```
## Usage
```javascript
import UpdaterUtil from 'react-native-updater-util';
UpdaterUtil.openInstaller(path)
```