public abstract class CampaignBroadcastReceiver
extends android.content.BroadcastReceiver
An abstract class to assist with retrieving data from a Meridian Campaign triggered Broadcast.
Constructor and Description |
---|
CampaignBroadcastReceiver() |
Modifier and Type | Method and Description |
---|---|
static EditorKey |
getAppKey(android.content.Intent i)
Retrieve the Meridian App Key that this broadcast was triggered with.
|
static java.lang.String |
getCampaignId(android.content.Intent i)
Retrieve the Meridian Campaign Identifier that this broadcast was triggered with.
|
static java.lang.String |
getCustom(android.content.Intent i)
An arbitrary string provided by 3rd party campaign endpoints for use in the client.
|
protected java.util.Map<java.lang.String,java.lang.String> |
getPushRegistrationUserInfo(android.content.Context context)
When a device is registered, the campaign service will call this method just before sending the registration request.
|
static java.lang.String |
getUserData(android.content.Intent i)
An arbitrary string provided by the campaign for use in the client.
|
protected java.util.Map<java.lang.String,java.lang.String> |
getUserInfoForCampaign(android.content.Context context,
java.lang.String campaignIdentifier)
When a campaign is triggered, the campaign service will call this method just before sending the request.
|
void |
onReceive(android.content.Context context,
android.content.Intent intent) |
protected abstract void |
onReceive(android.content.Context context,
android.content.Intent intent,
java.lang.String title,
java.lang.String message)
Forwarded from
BroadcastReceiver.onReceive(android.content.Context, android.content.Intent) with title and message unpacked for convenience. |
abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtras
public final void onReceive(android.content.Context context, android.content.Intent intent)
onReceive
in class android.content.BroadcastReceiver
protected abstract void onReceive(android.content.Context context, android.content.Intent intent, java.lang.String title, java.lang.String message)
Forwarded from BroadcastReceiver.onReceive(android.content.Context, android.content.Intent)
with title and message unpacked for convenience.
intent
- The intent delivered with this broadcast.title
- The user facing title of the Campaign.message
- The user facing message of the Campaign.protected java.util.Map<java.lang.String,java.lang.String> getUserInfoForCampaign(android.content.Context context, java.lang.String campaignIdentifier)
When a campaign is triggered, the campaign service will call this method just before sending the request. You can return a Map of parameters to include in the request, which will be forwarded to any third-party URL associated with the campaign.
context
- The context of the application requesting the user info.campaignIdentifier
- A string identifying the campaign that’s being triggered.protected java.util.Map<java.lang.String,java.lang.String> getPushRegistrationUserInfo(android.content.Context context)
When a device is registered, the campaign service will call this method just before sending the registration request. You can return a Map of parameters to include in the request, which will be forwarded to any third-party URL associated with the campaign.
context
- The context of the application requesting the user info.public static EditorKey getAppKey(android.content.Intent i)
Retrieve the Meridian App Key that this broadcast was triggered with.
public static java.lang.String getUserData(android.content.Intent i)
An arbitrary string provided by the campaign for use in the client.
public static java.lang.String getCustom(android.content.Intent i)
An arbitrary string provided by 3rd party campaign endpoints for use in the client.
public static java.lang.String getCampaignId(android.content.Intent i)
Retrieve the Meridian Campaign Identifier that this broadcast was triggered with.