1.0.3 • Published 4 years ago

rn-autostart v1.0.3

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

rn-autostart

Getting started

$ npm install rn-autostart --save

Mostly automatic installation

$ react-native link rn-autostart

Manual installation

Android

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

Usage

import Autostart from 'rn-autostart';

// check the autostart preferences menu for device. return Promise
Autostart.isSupported();
// open the autostart preferences menu for device
Autostart.open();
1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago