npm.io
1.0.1 • Published 5 years ago

react-native-restart-app-android

Licence
Version
1.0.1
Deps
0
Size
65 kB
Vulns
0
Weekly
0

react-native-restart-app-android

Getting started

$ npm install react-native-restart-app-android --save

Mostly automatic installation

$ react-native link react-native-restart-app-android

Manual installation
Android
  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNRestartAppAndroidPackage; to the imports at the top of the file
  • Add new RNRestartAppAndroidPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-restart-app-android'
    project(':react-native-restart-app-android').projectDir = new File(rootProject.projectDir,     '../node_modules/react-native-restart-app-android/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
    compile project(':react-native-restart-app-android')

Usage

import RNRestartAppAndroid from 'react-native-restart-app-android';

// TODO: What to do with the module?
RNRestartAppAndroid;

Keywords