mParticle Native Android Integration

Overview

You can integrate mParticle Android SDK with CleverTap to control the flow of information from the app SDK. You can send the following information to the CleverTap dashboard:

  • Push User Profiles
  • Push Events
  • Integrate Push Notifications

Prerequisites

The following are the prerequisites for performing this integration:

  • A CleverTap account
  • An mParticle account
  • A functional Android app

Integration

For CleverTap mParticle Android integration, the following are the major steps:

  1. Add Event Output.
  2. Connect the Input Feed and Output Event on the mParticle dashboard.
  3. Install SDK in the Native application.
  4. Initialize the mParticle client.

Add Event Output

To add an event output:

  1. Navigate to Setup > Output from the mParticle dashboard.
  2. Click Add Event Output and select CleverTap from the dropdown list.
2478

Select Event Output on mParticle Dashboard

After selecting, CleverTap Default Group is added under the Events tab of the Outputs page.

2478

Add CleverTap Event on mParticle Dashboard

  1. Click the Add Event Configuration icon to add event configuration. The Output: Event Configuration popup opens.
1116

Add Event Configuration Details

  1. Enter the following details and click Save to save the details:
FieldDescription
Configuration NameEnter the name to identify your configuration uniquely.
Use same settings for Development & ProductionSelect this option if you want to apply the same configuration settings for your production and development projects.
~ OR ~
Select PROD or DEV to apply these configuration settings to the respective project.
Account ID, Account Passcode, and Account TokenEnter these details to authenticate your CleverTap account. You can obtain these details by navigating to the Settings > Project page from the CleverTap dashboard.
RegionEnter the region of your CleverTap account.

The Output Configuration Saved message is displayed at the top of the Output page.

Connect Input Feed and Output Event on mParticle Dashboard

To connect input feed and output event on the mParticle dashboard:

  1. Navigate to the Connections > Connect page from the mParticle dashboard.
  2. Select Android from the Available Inputs.
2878

Select Android Input on mParticle Dashboard

  1. Click Connect Output. The Connect Output popup opens.
2480

Connect Output

  1. Select CleverTap and then select the Configuration Name that you want to connect.
1120

Select Configuration Name

  1. Toggle the Connection Status to forward data to the CleverTap dashboard.
  2. Select Customer ID from the User ID dropdown list.
  3. (Optional) Select the Min Platform Version.
1114

Add Connection Details

  1. Click Add Connection and click Done.
  2. (Optional) Set up the forwarding rule for your output. This allows you to control the data you want to forward to the CleverTap dashboard.
1864

Set Up Forwarding Rule

  1. (Optional) Enter the percentage of the user base for which you want to event data to help control the cost.
1980

Add User Sampling Percentage

  1. Click Save.

Install SDK in Native Application

To install Android SDK within the application, add the following dependency under dependencies within app/build.gradle file:

implementation 'com.mparticle:android-clevertap-kit:5.41.1'

Initialize mParticle Client

To initialize the mParticle client:

  1. Refer to Initialize SDK under mParticle documentation for initializing the SDK.
  2. Call ActivityLifecycleCallback.register(this); before super.onCreate() in your custom application class.

Push User Information

After installing an app on a device, your user is assigned an anonymous profile. The first time when the application identifies the user on the device, the anonymous history on the device is associated with the newly identified user. To learn more about how user information is pushed to the mParticle dashboard, refer to Track Users under mParticle documentation.

Push Events

To learn how to push event data whenever you want to capture any user action in your application, refer to Track Events under mParticle documentation.

Integrate Push Notification in Android

For more information about integrating Push Notification in Android, refer to Android Push Notification.

Integrate In-App in Android

For more information about integrating In-App in Android, refer to Android In-App.

Integrate App Inbox in Android

For more information about integrating App Inbox in Android, refer to Android App Inbox.

Advanced Features

To add advanced features to your Android app, refer to Android Advanced Settings.