Package com.batch.android
Class BatchInAppMessage
java.lang.Object
com.batch.android.BatchMessage
com.batch.android.BatchInAppMessage
- All Implemented Interfaces:
InAppMessageUserActionSource,UserActionSource
A subclass of BatchMessage that represents an In-App message
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceInterface defining a BatchInAppMessage content model object.Nested classes/interfaces inherited from class com.batch.android.BatchMessage
BatchMessage.Format -
Field Summary
FieldsFields inherited from class com.batch.android.BatchMessage
MESSAGING_EXTRA_PAYLOAD_KEY -
Constructor Summary
ConstructorsConstructorDescriptionBatchInAppMessage(String campaignToken, String campaignID, JSONObject eventData, JSONObject landingPayload, JSONObject customPayload) -
Method Summary
Modifier and TypeMethodDescriptionprotected BundleGet the campaign token.Get an In-App Message's visual contents.protected JSONObjectgetJSON()protected StringgetKind()Methods inherited from class com.batch.android.BatchMessage
getFormat, getMessageForBundle, writeToBundle, writeToIntent
-
Field Details
-
KIND
- See Also:
-
-
Constructor Details
-
BatchInAppMessage
public BatchInAppMessage(String campaignToken, String campaignID, JSONObject eventData, JSONObject landingPayload, JSONObject customPayload)
-
-
Method Details
-
getJSON
- Specified by:
getJSONin classBatchMessage
-
getKind
- Specified by:
getKindin classBatchMessage
-
getBundleRepresentation
- Specified by:
getBundleRepresentationin classBatchMessage
-
getCustomPayload
- Specified by:
getCustomPayloadin interfaceInAppMessageUserActionSource
-
getContent
Get an In-App Message's visual contents.
Since an In-App message's contents can change a lot between formats, you will need to cast this to one of the classes implementing
BatchInAppMessage.Content, such asBatchAlertContent,BatchInterstitialContent,BatchBannerContent,BatchImageContentorBatchWebViewContent
More types might be added in the future, so don't make any assumptions on the instance returned.- Returns:
- The In-App message's visual contents. Can be null if an error occurred or if not applicable
-
getCampaignToken
Get the campaign token. This is the same token as you see when opening the In-App Campaign in your browser, when on the dashboard.Can be null.
-