Skip to content

rajivshah3/react-native-google-safetynet

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

SafetyNet for React Native

GitHub version Maintainability 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?