mParticle

Using LOTaDATA SDK and mParticle together allows you to segment your users based on the places they visit and add a location-intelligence layer to your marketing campaigns. You can, for example, segment and send push notifications to users whom you have qualified as ''Regular Restaurant Visitors' based on who visited the restaurant more than one time in the last week.

Android Integration

Start with the SDK integration guide and the mParticle integration guide. After integrating both libraries, you can forward campaigns events from LOTaDATA to Leanplum.

To receive campaigns events from LOTaDATA, just call the method watchForCampaigns providing a listener for campaigns. In that listener you call the mParticle API in order to send the campaign event.

LDCampaignListener mCampaignListener = new LDCampaignListener() {
@Override
public void onEvent(LDCampaign ldCampaign) {
String campaignID = ldCampaign.id;
//Send campaign ID to mParticle
MPEvent event = new MPEvent.Builder(campaignID, EventType.Location)
.duration(100)
.build();
MParticle.getInstance().logEvent(event);
}
};
‚Äč
//For simplicity, we're assuming that an instance of MomentsClient was already taken
if(mMomentsClient != null) mMomentsClient.watchForCampaigns(mCampaignListener);