Skip to content
React Native implementation for Google's SafetyNet API
Branch: master
Clone or download
Latest commit 0c0bd42 May 23, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
android
docs Regenerate docs (#162) May 23, 2019
src Function for obtaining JWT token (#148) May 23, 2019
tests
.eslintignore Fix linting Apr 8, 2018
.eslintrc.yml
.gitattributes Initial commit Apr 7, 2018
.gitignore Initial commit Apr 7, 2018
.npmignore Regenerate docs (#162) May 23, 2019
.prettierignore Add linting Apr 8, 2018
.prettierrc
CHANGELOG.md Update changelog May 23, 2019
LICENSE Create LICENSE Apr 8, 2018
README.md Add Bitrise badge Oct 24, 2018
package.json v0.4.0 May 23, 2019
yarn.lock Regenerate docs (#162) May 23, 2019

README.md

SafetyNet for React Native

GitHub version Maintainability Codacy Badge Build Status

About SafetyNet

Google provides an API to verify device integrity and detect harmful apps. See the SafetyNet documentation for more information.

Getting started

$ npm install react-native-google-safetynet --save

or

$ yarn add react-native-google-safetynet

Mostly automatic installation

$ react-native link react-native-google-safetynet

Manual installation

Android

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

Usage

See the full documentation here

import RNGoogleSafetyNet from 'react-native-google-safetynet';

// TODO: What to do with the module?
You can’t perform that action at this time.