public abstract class InAppMessageImmersiveBase extends InAppMessageWithImageBase implements IInAppMessageImmersive
Modifier and Type | Field and Description |
---|---|
protected ImageStyle |
mImageStyle |
ANIMATE_IN, ANIMATE_OUT, CROP_TYPE, INAPP_MESSAGE_DURATION_DEFAULT_MILLIS, INAPP_MESSAGE_DURATION_MIN_MILLIS, IS_CONTROL, mBrazeManager, mCropType, MESSAGE_TEXT_ALIGN, mInAppMessageDarkThemeWrapper, mJsonObject, mMessageTextAlign, mOpenUriInWebview, OPEN_URI_IN_WEBVIEW, TYPE
Modifier | Constructor and Description |
---|---|
protected |
InAppMessageImmersiveBase() |
|
InAppMessageImmersiveBase(org.json.JSONObject object,
IBrazeManager appboyManager) |
Modifier and Type | Method and Description |
---|---|
void |
enableDarkTheme()
Instructs the
IInAppMessage to apply any dark theme settings
and override any existing values present on the IInAppMessage . |
org.json.JSONObject |
forJsonPut()
Storing in-app messages serialized with this method is primarily
for storage as triggered actions.
|
int |
getCloseButtonColor()
Gets the close button color on this in-app message.
|
java.lang.Integer |
getFrameColor()
Gets the frame color for this in-app message.
|
java.lang.String |
getHeader()
Gets the header text on this in-app message.
|
TextAlign |
getHeaderTextAlign()
Get the text alignment for the header text.
|
int |
getHeaderTextColor()
Gets the header text color on this in-app message.
|
ImageStyle |
getImageStyle()
Get the image style on this in-app message.
|
java.util.List<MessageButton> |
getMessageButtons()
Gets the message buttons for this in-app message.
|
boolean |
logButtonClick(MessageButton messageButton)
Logs a click on this message button.
|
void |
onAfterClosed()
Should be called on the in-app message once it is no longer being displayed, to allow it
to perform any cleanup or trigger further actions.
|
void |
setCloseButtonColor(int closeButtonColor)
Sets the close button color on this in-app message.
|
void |
setFrameColor(java.lang.Integer frameColor)
Sets the frame color for this in-app message.
|
void |
setHeader(java.lang.String header)
Sets the header text of this in-app message.
|
void |
setHeaderTextAlign(TextAlign textAlign)
Set the text alignment for the header text.
|
void |
setHeaderTextColor(int headerTextColor)
Sets the header text color on this in-app message.
|
void |
setImageStyle(ImageStyle imageStyle)
Set the image style on this in-app message.
|
void |
setMessageButtons(java.util.List<MessageButton> messageButtons)
Sets the message buttons for this in-app message.
|
getBitmap, getImageDownloadSuccessful, getImageUrl, getLocalImageUrl, getRemoteAssetPathsForPrefetch, getRemoteImageUrl, setBitmap, setImageDownloadSuccessful, setImageUrl, setLocalImageUrl, setLocalPrefetchedAssetPaths, setRemoteImageUrl
getAnimateIn, getAnimateOut, getBackgroundColor, getClickAction, getCropType, getDismissType, getDurationInMilliseconds, getExpirationTimestamp, getExtras, getIcon, getIconBackgroundColor, getIconColor, getLocalPrefetchedAssetPaths, getMessage, getMessageTextAlign, getMessageTextColor, getOpenUriInWebView, getOrientation, getUri, isControl, logClick, logDisplayFailure, logImpression, setAnimateIn, setAnimateOut, setBackgroundColor, setClickAction, setClickAction, setCropType, setDismissType, setDurationInMilliseconds, setExpirationTimestamp, setExtras, setIcon, setIconBackgroundColor, setIconColor, setMessage, setMessageTextAlign, setMessageTextColor, setOpenUriInWebView, setOrientation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAnimateIn, getAnimateOut, getBackgroundColor, getClickAction, getCropType, getDismissType, getDurationInMilliseconds, getExpirationTimestamp, getExtras, getIcon, getIconBackgroundColor, getIconColor, getLocalPrefetchedAssetPaths, getMessage, getMessageTextAlign, getMessageTextColor, getMessageType, getOpenUriInWebView, getOrientation, getRemoteAssetPathsForPrefetch, getUri, isControl, logClick, logDisplayFailure, logImpression, setAnimateIn, setAnimateOut, setBackgroundColor, setClickAction, setClickAction, setCropType, setDismissType, setDurationInMilliseconds, setExpirationTimestamp, setExtras, setIcon, setIconBackgroundColor, setIconColor, setLocalPrefetchedAssetPaths, setMessage, setMessageTextAlign, setMessageTextColor, setOpenUriInWebView, setOrientation
protected ImageStyle mImageStyle
protected InAppMessageImmersiveBase()
public InAppMessageImmersiveBase(org.json.JSONObject object, IBrazeManager appboyManager) throws org.json.JSONException
org.json.JSONException
- if any fields are missing or the message is empty. Constructed InAppMessageImmersive
objects are meant to be fully verified and good to go.public java.lang.String getHeader()
IInAppMessageImmersive
getHeader
in interface IInAppMessageImmersive
public int getHeaderTextColor()
IInAppMessageImmersive
getHeaderTextColor
in interface IInAppMessageImmersive
Color
public int getCloseButtonColor()
IInAppMessageImmersive
getCloseButtonColor
in interface IInAppMessageImmersive
Color
public java.util.List<MessageButton> getMessageButtons()
IInAppMessageImmersive
See MessageButton
.
getMessageButtons
in interface IInAppMessageImmersive
public java.lang.Integer getFrameColor()
IInAppMessageImmersive
getFrameColor
in interface IInAppMessageImmersive
public ImageStyle getImageStyle()
IInAppMessageImmersive
getImageStyle
in interface IInAppMessageImmersive
public TextAlign getHeaderTextAlign()
IInAppMessageImmersive
getHeaderTextAlign
in interface IInAppMessageImmersive
public void setHeaderTextAlign(TextAlign textAlign)
IInAppMessageImmersive
setHeaderTextAlign
in interface IInAppMessageImmersive
textAlign
- the text alignment for the header textpublic void setImageStyle(ImageStyle imageStyle)
IInAppMessageImmersive
setImageStyle
in interface IInAppMessageImmersive
imageStyle
- the image style for this in-app messagepublic void setFrameColor(java.lang.Integer frameColor)
IInAppMessageImmersive
setFrameColor
in interface IInAppMessageImmersive
frameColor
- the desired frame color, or null if the default should be used.public void setMessageButtons(java.util.List<MessageButton> messageButtons)
IInAppMessageImmersive
See MessageButton
setMessageButtons
in interface IInAppMessageImmersive
messageButtons
- list of message buttons for this in-app message.public void setHeader(java.lang.String header)
IInAppMessageImmersive
setHeader
in interface IInAppMessageImmersive
header
- the desired header text for this in-app message.public void setHeaderTextColor(int headerTextColor)
IInAppMessageImmersive
setHeaderTextColor
in interface IInAppMessageImmersive
headerTextColor
- See Color
public void setCloseButtonColor(int closeButtonColor)
IInAppMessageImmersive
setCloseButtonColor
in interface IInAppMessageImmersive
closeButtonColor
- See Color
public boolean logButtonClick(MessageButton messageButton)
IInAppMessageImmersive
Message button clicks may only be logged once per in-app message
before requiring a reset to re-enable logging.
To log multiple clicks to the same IInAppMessage,
for example, when the same IInAppMessage instance is used to back multiple
in-app messages shown to the user, use #resetAnalytics()
logButtonClick
in interface IInAppMessageImmersive
public void onAfterClosed()
IInAppMessage
onAfterClosed
in interface IInAppMessage
onAfterClosed
in class InAppMessageBase
public void enableDarkTheme()
IInAppMessageThemeable
IInAppMessage
to apply any dark theme settings
and override any existing values present on the IInAppMessage
.enableDarkTheme
in interface IInAppMessageThemeable
enableDarkTheme
in class InAppMessageBase
public org.json.JSONObject forJsonPut()
InAppMessageBase
forJsonPut
in interface IPutIntoJson<org.json.JSONObject>
forJsonPut
in class InAppMessageWithImageBase