1.0.1 • Published 4 years ago

react-native-restart-app-android v1.0.1

Weekly downloads
8
License
-
Repository
-
Last release
4 years ago

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;