-
- All Implemented Interfaces:
-
android.os.Parcelable
public class CTInboxMessageContent implements Parcelable
Public model class for the "msg" object from notification inbox payload
-
-
Field Summary
Fields Modifier and Type Field Description public final static Parcelable.Creator<CTInboxMessageContent>CREATORprivate StringactionUrlprivate StringcontentTypeprivate Stringiconprivate StringiconContentDescriptionprivate JSONArraylinksprivate Stringmediaprivate StringmediaContentDescriptionprivate Stringmessageprivate StringmessageColorprivate StringposterUrlprivate Stringtitleprivate StringtitleColor
-
Method Summary
Modifier and Type Method Description StringgetActionUrl()Return the action URL of the body of the inbox message voidsetActionUrl(String actionUrl)StringgetContentType()Returns the content type of the media StringgetIcon()Returns the URL as String for the icon in case of Icon Message template voidsetIcon(String icon)StringgetIconContentDescription()Returns the content description for the icon in case of an Icon Message template. voidsetIconContentDescription(String contentDescription)JSONArraygetLinks()Returns a JSONArray of Call to Action buttons voidsetLinks(JSONArray links)StringgetMedia()Returns the media URL of the inbox message voidsetMedia(String media)StringgetMediaContentDescription()Returns the content description of the media in the inbox message. voidsetMediaContentDescription(String contentDescription)StringgetMessage()Returns the message section of the inbox message voidsetMessage(String message)StringgetMessageColor()Returns the hexcode value of the message color as String voidsetMessageColor(String messageColor)StringgetPosterUrl()Returns URL for the thumbnail of the video voidsetPosterUrl(String posterUrl)StringgetTitle()Returns the title section of the inbox message voidsetTitle(String title)StringgetTitleColor()Returns the hexcode value of the title color as String voidsetTitleColor(String titleColor)intdescribeContents()StringgetLinkBGColor(JSONObject jsonObject)Returns the background color for the JSONObject of Link provided StringgetLinkColor(JSONObject jsonObject)Returns the text color for the JSONObject of Link provided StringgetLinkCopyText(JSONObject jsonObject)Returns the text for the JSONObject of Link providedThe JSONObject of Link provided should be of the type "copy" HashMap<String, String>getLinkKeyValue(JSONObject jsonObject)Returns the Key Value pair with for the JSONObject of Link provided StringgetLinkText(JSONObject jsonObject)Returns the text for the JSONObject of Link provided StringgetLinkUrl(JSONObject jsonObject)Returns the text for the JSONObject of Link providedThe JSONObject of Link provided should be of the type "url" StringgetLinktype(JSONObject jsonObject)Returns the type for the JSONObject of Link provided booleanisFallbackSettingsEnabled(JSONObject jsonObject)booleanmediaIsAudio()Method to check whether media in the CTInboxMessageContent object is an audio. booleanmediaIsGIF()Method to check whether media in the CTInboxMessageContent object is an GIF. booleanmediaIsImage()Method to check whether media in the CTInboxMessageContent object is an image. booleanmediaIsVideo()Method to check whether media in the CTInboxMessageContent object is a video. booleanmediaIsStreamable()voidwriteToParcel(Parcel dest, int flags)-
-
Method Detail
-
getActionUrl
String getActionUrl()
Return the action URL of the body of the inbox message
-
setActionUrl
void setActionUrl(String actionUrl)
-
getContentType
String getContentType()
Returns the content type of the media
-
getIconContentDescription
String getIconContentDescription()
Returns the content description for the icon in case of an Icon Message template.
-
setIconContentDescription
void setIconContentDescription(String contentDescription)
-
getMediaContentDescription
String getMediaContentDescription()
Returns the content description of the media in the inbox message.
-
setMediaContentDescription
void setMediaContentDescription(String contentDescription)
-
getMessage
String getMessage()
Returns the message section of the inbox message
-
setMessage
void setMessage(String message)
-
getMessageColor
String getMessageColor()
Returns the hexcode value of the message color as String
-
setMessageColor
void setMessageColor(String messageColor)
-
getPosterUrl
String getPosterUrl()
Returns URL for the thumbnail of the video
-
setPosterUrl
void setPosterUrl(String posterUrl)
-
getTitleColor
String getTitleColor()
Returns the hexcode value of the title color as String
-
setTitleColor
void setTitleColor(String titleColor)
-
describeContents
int describeContents()
-
getLinkBGColor
String getLinkBGColor(JSONObject jsonObject)
Returns the background color for the JSONObject of Link provided
- Parameters:
jsonObject- of Link
-
getLinkColor
String getLinkColor(JSONObject jsonObject)
Returns the text color for the JSONObject of Link provided
- Parameters:
jsonObject- of Link
-
getLinkCopyText
String getLinkCopyText(JSONObject jsonObject)
Returns the text for the JSONObject of Link providedThe JSONObject of Link provided should be of the type "copy"
- Parameters:
jsonObject- of Link
-
getLinkKeyValue
HashMap<String, String> getLinkKeyValue(JSONObject jsonObject)
Returns the Key Value pair with for the JSONObject of Link provided
-
getLinkText
String getLinkText(JSONObject jsonObject)
Returns the text for the JSONObject of Link provided
- Parameters:
jsonObject- of Link
-
getLinkUrl
String getLinkUrl(JSONObject jsonObject)
Returns the text for the JSONObject of Link providedThe JSONObject of Link provided should be of the type "url"
- Parameters:
jsonObject- of Link
-
getLinktype
String getLinktype(JSONObject jsonObject)
Returns the type for the JSONObject of Link provided
- Parameters:
jsonObject- of Link
-
isFallbackSettingsEnabled
boolean isFallbackSettingsEnabled(JSONObject jsonObject)
-
mediaIsAudio
boolean mediaIsAudio()
Method to check whether media in the CTInboxMessageContent object is an audio.
-
mediaIsGIF
boolean mediaIsGIF()
Method to check whether media in the CTInboxMessageContent object is an GIF.
-
mediaIsImage
boolean mediaIsImage()
Method to check whether media in the CTInboxMessageContent object is an image.
-
mediaIsVideo
boolean mediaIsVideo()
Method to check whether media in the CTInboxMessageContent object is a video.
-
mediaIsStreamable
boolean mediaIsStreamable()
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
-
-
-