mFilterIt Android SDK
This guide details the steps to integrate the MFilterIt SDK into an 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 directly adding the SDK jar to the project.
1. Integration using jar sdk:
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
Permission
Level
Description
ACCESS_NETWORK_STATE
Mandatory
Allows applications to access information about networks
INTERNET
Mandatory
Allows access to the internet
READ_PHONE_STATE
Optional
Allows read only access to phone state.
WRITE_EXTERNAL_STORAGE
Optional
Allows write into external storage area
ACCESS_WIFI_STATE
Optional
Allows application to query Wifi state
GET_ACCOUNTS
Optional
Allows application to access Google accounts data
READ_CALL_LOG
Optional
Allows an application to read the user's call log
READ_SMS
Optional
Allows an application to read SMS messages.
READ_CONTACTS
Optional
Allows an application to read the user's contacts data.
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 : Initialize the SDK The SDK is initialized by invoking the sdkInit API. This should be done in the OnCreate routine of the SplashScreeen Activity. sdkInit is invoked as shown below The below is a description of the parameters taken by the sdkInit Routine.
Parameter
Description
context
Context object returned by getApplicationContext
vendorId
This is a unique Vendor ID string allocated to the app developer. The Vendor ID is provided to you at registration, and is critical to identify the server side endpoint. Please contact us for the Vendor ID, at contact@mfilterit.com
extDataPoints
Set to "MfilterIt.DATAPOINTS_LEVEL_1"
A code snippet of a sample OnCreate is captured below
Step 4: The below import statement needs to be added to the corresponding files.
import com.mfilterit.MFilterIt;
Step 5: For Install Referrer api, please add gradle dependency in app module, as below:
Note: For gradle dependencies, please use compile/ implementation based on gradle version.
Passing custom application data to SDK
The mFilterIt SDK provides the below interface so that custom application specific data can be passed to the SDK.
MFilterIt.setApplicationData (Context context, String applicationData);
Parameter
Description
context
Context object returned by getApplicationContext.
applicationData
Typically the Referral String received from Play Store is passed to this
function. Alternatively, you can pass your own unique identifier for this
installation, which can be later used to correlate your install data with
that reported by the SDK.
This code snippet shows how this API is invoked in the onCreate routine.
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. For Install Referrer Broadcast receivers care needs to be taken that there is no conflict with other SDKs from attribution platforms etc.
3. For uninstall tracking, please refer to this link.
4. For event tracking, please refer to this link.
5. Please update the following in proguard rules file( in case of encrypted jar uses):
Last updated