Overview
The plugin is located at npmjs repositories (npm repositories)
This plugin is built for:
- Mobigate SDK version 1.0.4
Adding SDK to the project
First, install library from the repository with
yarn add react-native-mobigate
or
npm install react-native-mobigate --save
Link newly added plugin
- 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:
- 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
...
import pl.spicymobile.reactmobigate.MobigatePackage;
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new MobigatePackage()
);
}
Api methods
SDK initialization
Tracking in app events
Remaining methods
Constants
Sample app