mFilterIt React-Native Integration
This guide details the steps to integrate the MFilterIt SDK into a react-native Android App
Getting Started
Integrating the mFilterIt Solution into an app includes Developer Registration and SDK integration.
Developer Registration
Developers wishing to use mFilterIt should first register themselves. Upon registration, a unique vendor ID will be allocated.
Please contact us to initiate the registration, at contact@mfilterit.com
SDK Integration
The SDK integration can be done by adding the SDK jar to the project.
Step 1 : The SDK is made available as a jar archive . This archive needs to be included into App project.
Step 2 : Provide permissions to the SDK The mFilterIt SDK requires the following permissions to be granted in the Android manifest file
The mFilterIt algorithm works most efficiently when all permissions are allowed. However, the SDK is able detect some fraudulent activity with the mandatory permissions itself.
Step 3 : Insert the following lines inside the dependencies block in android/app/build.gradle :
Here $PATH$ is the file path of jar file relative to root path.
Step 4 : Open up android/app/src/main/java/[...]/MainApplication.java and add the following line to imports (at the top of the file):
Step 5 : Initialize the SDK, The SDK is initialized by invoking the sdkInit API. This should be done in the OnCreate routine of the MainApplication.java. sdkInit is invoked as shown below The below is a description of the parameters taken by the sdkInit Routine.
A code snippet of a sample OnCreate is captured below
Points to remember : 1. For Android 6.0+ devices, please take the mandatory permissions from the user before the SDK is triggered. The SDK does not take any permissions on its own, and depends on the app to take the needed permissions before hand.
2. Please update the following in proguard rules file ( in case of encrypted jar uses):
Last updated