react-native-confirm-device-credentials
A simple React Native module to access Android's native device authentication screen.
Getting started
$ npm install react-native-confirm-device-credentials --save
Mostly automatic installation
$ react-native link react-native-confirm-device-credentials
Manual installation
Android (Only API 23 and above are supported)
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import org.celo.devicecredentials.RNConfirmDeviceCredentialsPackage;
to the imports at the top of the file - Add
new RNConfirmDeviceCredentialsPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-confirm-device-credentials' project(':react-native-confirm-device-credentials').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-confirm-device-credentials/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-confirm-device-credentials')
Usage
; ConfirmDeviceCredentials;