React Native Mobigate SDK plugin for Android
MobigateSDK is a tool for gathering users phone data and events tracking.
Overview
Plugin installation
yarn add react-native-mobigate
or
npm install react-native-mobigate --save
React Native >= 0.60
Starting from React Native 0.60, autolinking makes the installation process simpler
React Native <= 0.59
Mostly automatic installation:
react-native link react-native-mobigate
Manual installation:
Manually link the library on Android
- Add to:
android/settings.gradle
include ':react-native-mobigate'project(':react-native-mobigate').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-mobigate/android')
- Add to:
android/app/build.gradle
dependencies {implementation project(':react-native-mobigate')}
- Add the MobigatePackage class to your list of exported packages into:
android/app/src/main/.../MainApplication.java
... @Overrideprotected List<ReactPackage> { return Arrays.<ReactPackage>;}
SDK Initialization
Initialize SDK first
if PlatformOS === 'android' Mobigate
Start gather data
Mobigate