1.3.0 • Published 5 years ago

react-native-unlock-device v1.3.0

Weekly downloads
133
License
-
Repository
github
Last release
5 years ago

react-native-unlock-device

Getting started

$ npm install react-native-react-native-unlock-device --save

Mostly automatic installation

$ react-native link react-native-react-native-unlock-device

Manual installation

Android

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

Add this this AndroidManifest.xml

<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>

Usage

import RNUnlockDevice from 'react-native-unlock-device';

// TODO: What to do with the module?
RNUnlockDevice.unlock()
  .then(() => console.log('Success'))
  .catch(error => console.log('Error', error));
1.3.0

5 years ago

1.2.5

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.5

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago