Page Contents
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:
- Mostly automatic installation:
Api methods
To use any method from the plugin add import:
import Mobigate from 'react-native-mobigate'
SDK initialization
You must initialize the library before running it. Use init(apiKey, options, onSuccess, onError) method for that:
Mobigate.init(apiKey, options, onSuccess, onError)
| Parameter | Type | Description |
|---|---|---|
| apiKey | String | Api key provided by your business partner |
| options | Json Object | SDK configuration |
| onSuccess | Function | returns callback object |
| onError | Function | returns callback object |
Options
| Name | Type | Default | Description |
|---|---|---|---|
| appIdentifier | String | Application identifier | |
| appInstallationSource | String | App installation source e.g., google-play, organic. | |
| String | Set's user email. | ||
| customUserId | String | Set custom User Agent. | |
| enableUserFields | Json Array | Enable custom fields in user data. By default MobienceSDK is gathering all identifiers, which it can read. You can choose one of these field: ["email", "imei", "imsi", "msisdn", "mac", "serial"] DODAĆ LINKA DO CONSTANTS. | |
| dataGatherPolicy | Json Object | Enable custom data gater policy. By default MobienceSDK gather all data it can read and hide notification icon. Check below DataGatherPolicy options for more details. | |
| enableIdProfiles | Boolean | false | turns on / off the IDs profiles system. |
DataGatherPolicy options
| Name | Type | Default | Description |
|---|---|---|---|
| monitorState | String | Application identifier | |
| notificationText | String | if state = "DEFAULT" you can pass custom foreground service notification text |
Tracking in app events
Remaining methods
| Name | Type | Default | Description |
|---|---|---|---|