-
- All Implemented Interfaces:
-
android.os.Parcelable
public interface PushMessage implements Parcelable
-
-
Method Summary
Modifier and Type Method Description abstract Booleanhas(String key)Checks whether the message data contains the specified key. abstract Stringdata(String key)Retrieves the data associated with the specified key. abstract UnitrecordAction(Context context)Records an action event occurrence for the message. abstract UnitrecordAction(Context context, Integer buttonIndex)Records an action event occurrence for a specific button index. abstract StringgetId()Internal message ID. abstract StringgetTitle()Title of the message. abstract StringgetTitleColor()Title color of the message. abstract StringgetMessage()Content of the message. abstract StringgetMessageColor()Content of the message color. abstract StringgetSound()Message sound. abstract IntegergetBadge()Badge count for the message. abstract UrigetLink()Default link to open for the message. abstract URLgetMedia()Media URL associated with the message (e.g., JPEG or PNG image). abstract List<PushMessageButton>getButtons()List of buttons associated with the message. abstract Set<String>getDataKeys()Set of all data keys in the message, including standard keys like "title" or "message". abstract Map<String, Object>getCustomData()Map of custom data key-value pairs sent with the message. abstract MessageTypegetType()Type of the message. abstract TimerTemplategetTimerTemplate()Timer template associated with the message, if any. abstract BooleangetSticky()Whether the message is sticky. abstract LonggetAutoDismissDuration()Duration after which the message will automatically dismiss. abstract StringgetDismissLabel()Label for the dismiss button in Android notifications. -
-
Method Detail
-
has
abstract Boolean has(String key)
Checks whether the message data contains the specified key.
- Parameters:
key- Key to check for.
-
data
abstract String data(String key)
Retrieves the data associated with the specified key.
- Parameters:
key- Key to retrieve the value for.
-
recordAction
abstract Unit recordAction(Context context)
Records an action event occurrence for the message.
- Parameters:
context- Context to record the action in.
-
recordAction
abstract Unit recordAction(Context context, Integer buttonIndex)
Records an action event occurrence for a specific button index.
- Parameters:
context- Context to record the action in.buttonIndex- Index of the button to record the action for.
-
getTitleColor
abstract String getTitleColor()
Title color of the message.
-
getMessage
abstract String getMessage()
Content of the message.
-
getMessageColor
abstract String getMessageColor()
Content of the message color.
-
getSound
abstract String getSound()
Message sound. Default is "default". Other sounds are specified as URIs from app resources.
-
getButtons
abstract List<PushMessageButton> getButtons()
List of buttons associated with the message.
-
getDataKeys
abstract Set<String> getDataKeys()
Set of all data keys in the message, including standard keys like "title" or "message".
-
getCustomData
abstract Map<String, Object> getCustomData()
Map of custom data key-value pairs sent with the message.
-
getType
abstract MessageType getType()
Type of the message. Possible values: TEXT, CAROUSEL, RATING, BANNER, TIMER.
-
getTimerTemplate
abstract TimerTemplate getTimerTemplate()
Timer template associated with the message, if any.
-
getAutoDismissDuration
abstract Long getAutoDismissDuration()
Duration after which the message will automatically dismiss.
-
getDismissLabel
abstract String getDismissLabel()
Label for the dismiss button in Android notifications.
-
-
-
-