React Native implementation for Google's SafetyNet API
MIT License
Google provides an API to verify device integrity and detect harmful apps. See the SafetyNet documentation for more information.
$ npm install react-native-google-safetynet --save
or
$ yarn add react-native-google-safetynet
$ react-native link react-native-google-safetynet
android/app/src/main/java/[...]/MainActivity.java
import com.rajivshah.safetynet.RNGoogleSafetyNetPackage;
to the imports at the top of the filenew RNGoogleSafetyNetPackage()
to the list returned by the getPackages()
methodandroid/settings.gradle
:
include ':react-native-google-safetynet'
project(':react-native-google-safetynet').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-google-safetynet/android')
android/app/build.gradle
:
compile project(':react-native-google-safetynet')
See the full documentation here
import RNGoogleSafetyNet from 'react-native-google-safetynet';
// TODO: What to do with the module?