public class BrazeNotificationPayload
extends java.lang.Object
Null return values for methods, such as on getCustomNotificationId()
are the result of that key either not existing in the original push payload
or not being in the proper expected format.
Modifier and Type | Class and Description |
---|---|
static class |
BrazeNotificationPayload.ActionButton |
static class |
BrazeNotificationPayload.ConversationMessage |
static class |
BrazeNotificationPayload.ConversationPerson |
static class |
BrazeNotificationPayload.PushStoryPage |
Constructor and Description |
---|
BrazeNotificationPayload(AppboyConfigurationProvider configurationProvider,
android.os.Bundle notificationExtras)
Deprecated.
Please use
BrazeNotificationPayload(BrazeConfigurationProvider, Bundle)
instead. Deprecated since 3/25/21 |
BrazeNotificationPayload(BrazeConfigurationProvider configurationProvider,
android.os.Bundle notificationExtras) |
BrazeNotificationPayload(android.os.Bundle notificationExtras) |
BrazeNotificationPayload(android.os.Bundle notificationExtras,
android.os.Bundle appboyExtras)
Constructor for when using a modified "appboyExtras" bundle
|
BrazeNotificationPayload(android.content.Context context,
AppboyConfigurationProvider configurationProvider,
android.os.Bundle notificationExtras)
Deprecated.
|
BrazeNotificationPayload(android.content.Context context,
AppboyConfigurationProvider configurationProvider,
android.os.Bundle notificationExtras,
android.os.Bundle appboyExtras)
Deprecated.
|
BrazeNotificationPayload(android.content.Context context,
BrazeConfigurationProvider configurationProvider,
android.os.Bundle notificationExtras) |
BrazeNotificationPayload(android.content.Context context,
BrazeConfigurationProvider configurationProvider,
android.os.Bundle notificationExtras,
android.os.Bundle appboyExtras) |
BrazeNotificationPayload(android.content.Context context,
android.os.Bundle notificationExtras) |
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
getAccentColor() |
java.util.List<BrazeNotificationPayload.ActionButton> |
getActionButtons() |
AppboyConfigurationProvider |
getAppboyConfigurationProvider()
Deprecated.
Please use
getConfigurationProvider() instead. Deprecated since 3/25/21 |
android.os.Bundle |
getAppboyExtras() |
static android.os.Bundle |
getAttachedAppboyExtras(android.os.Bundle notificationExtras)
Get the extras Bundle from the notification extras or an empty bundle.
|
java.lang.String |
getBigImageUrl() |
java.lang.String |
getBigSummaryText() |
java.lang.String |
getBigTitleText() |
BrazeConfigurationProvider |
getConfigurationProvider() |
java.lang.String |
getContentCardSyncData() |
java.lang.String |
getContentCardSyncUserId() |
java.lang.String |
getContentText() |
android.content.Context |
getContext() |
java.util.List<BrazeNotificationPayload.ConversationMessage> |
getConversationMessages() |
java.util.Map<java.lang.String,BrazeNotificationPayload.ConversationPerson> |
getConversationPersonMap() |
java.lang.String |
getConversationReplyPersonId() |
java.lang.String |
getConversationShortcutId() |
java.lang.Integer |
getCustomNotificationId() |
java.lang.String |
getLargeIcon() |
java.lang.Integer |
getNotificationBadgeNumber() |
java.lang.String |
getNotificationCategory() |
java.lang.String |
getNotificationChannelId() |
android.os.Bundle |
getNotificationExtras() |
java.lang.Long |
getNotificationReceivedTimestampMillis() |
java.lang.String |
getNotificationSound() |
java.lang.Integer |
getNotificationVisibility() |
java.lang.String |
getPublicNotificationExtras() |
java.lang.Integer |
getPushDuration() |
static int |
getPushStoryGravityAtIndex(int actionIndex,
android.os.Bundle notificationExtras,
java.lang.String actionFieldKeyTemplate) |
int |
getPushStoryPageIndex() |
java.util.List<BrazeNotificationPayload.PushStoryPage> |
getPushStoryPages() |
java.lang.String |
getSummaryText() |
static java.lang.String |
getTemplateFieldAtIndex(int index,
android.os.Bundle notificationExtras,
java.lang.String actionFieldKeyTemplate)
Returns the value for the given template field key at the specified index.
|
static boolean |
getTemplateFieldAtIndex(int actionIndex,
android.os.Bundle notificationExtras,
java.lang.String actionFieldKeyTemplate,
boolean defaultValue)
Returns the boolean value for the given template field key at the specified index.
|
static long |
getTemplateFieldAtIndex(int actionIndex,
android.os.Bundle notificationExtras,
java.lang.String actionFieldKeyTemplate,
long defaultValue)
Returns the boolean value for the given template field key at the specified index.
|
static java.lang.String |
getTemplateFieldAtIndex(int index,
android.os.Bundle notificationExtras,
java.lang.String actionFieldKeyTemplate,
java.lang.String defaultValue)
Returns the value for the given template field key at the specified index.
|
java.lang.String |
getTitleText() |
boolean |
isConversationalPush() |
boolean |
isInlineImagePush() |
boolean |
isPushStory() |
void |
setAccentColor(java.lang.Integer accentColor) |
void |
setActionButtons(java.util.List<BrazeNotificationPayload.ActionButton> actionButtons) |
void |
setAppboyConfigurationProvider(AppboyConfigurationProvider appboyConfigurationProvider)
Deprecated.
Please use
setConfigurationProvider(BrazeConfigurationProvider)
instead. Deprecated since 3/25/21 |
void |
setAppboyExtras(android.os.Bundle appboyExtras) |
void |
setBigImageUrl(java.lang.String bigImageUrl)
Equivalent to setting
Constants.APPBOY_PUSH_BIG_IMAGE_URL_KEY
in the "appboyExtras" bundle. |
void |
setBigSummaryText(java.lang.String bigSummaryText) |
void |
setBigTitleText(java.lang.String bigTitleText) |
void |
setConfigurationProvider(BrazeConfigurationProvider configurationProvider) |
void |
setContentCardSyncData(java.lang.String contentCardSyncData) |
void |
setContentCardSyncUserId(java.lang.String contentCardSyncUserId) |
void |
setContentText(java.lang.String content) |
void |
setContext(android.content.Context context) |
void |
setConversationalPush(boolean conversationalPush) |
void |
setConversationShortcutId(java.lang.String conversationShortcutId) |
void |
setCustomNotificationId(java.lang.Integer customNotificationId) |
void |
setInlineImagePush(boolean inlineImagePush) |
void |
setIsInlineImagePush(boolean isInlineImagePush) |
void |
setLargeIcon(java.lang.String largeIcon) |
void |
setNotificationBadgeNumber(java.lang.Integer notificationBadgeNumber) |
void |
setNotificationCategory(java.lang.String notificationCategory) |
void |
setNotificationChannelId(java.lang.String notificationChannelId) |
void |
setNotificationReceivedTimestampMillis(java.lang.Long notificationReceivedTimestampMillis) |
void |
setNotificationSound(java.lang.String notificationSound) |
void |
setNotificationVisibility(java.lang.Integer notificationVisibility) |
void |
setPublicNotificationExtras(java.lang.String publicNotificationExtras) |
void |
setPushDuration(java.lang.Integer pushDuration) |
void |
setPushStory(boolean pushStory) |
void |
setPushStoryPageIndex(int pushStoryPageIndex) |
void |
setPushStoryPages(java.util.List<BrazeNotificationPayload.PushStoryPage> pushStoryPages) |
void |
setSummaryText(java.lang.String summaryText) |
void |
setTitleText(java.lang.String title) |
java.lang.String |
toString() |
@Deprecated public BrazeNotificationPayload(AppboyConfigurationProvider configurationProvider, android.os.Bundle notificationExtras)
BrazeNotificationPayload(BrazeConfigurationProvider, Bundle)
instead. Deprecated since 3/25/21public BrazeNotificationPayload(BrazeConfigurationProvider configurationProvider, android.os.Bundle notificationExtras)
public BrazeNotificationPayload(android.content.Context context, android.os.Bundle notificationExtras)
@Deprecated public BrazeNotificationPayload(android.content.Context context, AppboyConfigurationProvider configurationProvider, android.os.Bundle notificationExtras)
public BrazeNotificationPayload(android.content.Context context, BrazeConfigurationProvider configurationProvider, android.os.Bundle notificationExtras)
@Deprecated public BrazeNotificationPayload(android.content.Context context, AppboyConfigurationProvider configurationProvider, android.os.Bundle notificationExtras, android.os.Bundle appboyExtras)
public BrazeNotificationPayload(android.content.Context context, BrazeConfigurationProvider configurationProvider, android.os.Bundle notificationExtras, android.os.Bundle appboyExtras)
public BrazeNotificationPayload(android.os.Bundle notificationExtras)
public BrazeNotificationPayload(android.os.Bundle notificationExtras, android.os.Bundle appboyExtras)
public int getPushStoryPageIndex()
public void setPushStoryPageIndex(int pushStoryPageIndex)
public android.os.Bundle getNotificationExtras()
public android.content.Context getContext()
@Deprecated public AppboyConfigurationProvider getAppboyConfigurationProvider()
getConfigurationProvider()
instead. Deprecated since 3/25/21public BrazeConfigurationProvider getConfigurationProvider()
public android.os.Bundle getAppboyExtras()
public java.lang.String getTitleText()
public java.lang.Integer getPushDuration()
public java.lang.String getContentCardSyncData()
public java.lang.String getContentCardSyncUserId()
public java.lang.String getNotificationSound()
public java.lang.String getNotificationChannelId()
public java.lang.String getContentText()
public boolean isPushStory()
public java.lang.String getLargeIcon()
public java.lang.String getSummaryText()
public java.lang.Integer getAccentColor()
public java.lang.String getNotificationCategory()
public java.lang.Integer getNotificationVisibility()
public java.lang.Integer getNotificationBadgeNumber()
public java.lang.String getPublicNotificationExtras()
public java.lang.String getBigSummaryText()
public java.lang.String getBigTitleText()
public java.lang.String getBigImageUrl()
public java.lang.Integer getCustomNotificationId()
public java.lang.Long getNotificationReceivedTimestampMillis()
public java.util.List<BrazeNotificationPayload.ActionButton> getActionButtons()
public boolean isConversationalPush()
public java.lang.String getConversationReplyPersonId()
public java.util.List<BrazeNotificationPayload.ConversationMessage> getConversationMessages()
public java.util.Map<java.lang.String,BrazeNotificationPayload.ConversationPerson> getConversationPersonMap()
public java.lang.String getConversationShortcutId()
public void setInlineImagePush(boolean inlineImagePush)
public void setConversationalPush(boolean conversationalPush)
public void setConversationShortcutId(java.lang.String conversationShortcutId)
public void setActionButtons(java.util.List<BrazeNotificationPayload.ActionButton> actionButtons)
public java.util.List<BrazeNotificationPayload.PushStoryPage> getPushStoryPages()
public void setPushStoryPages(java.util.List<BrazeNotificationPayload.PushStoryPage> pushStoryPages)
public boolean isInlineImagePush()
public void setIsInlineImagePush(boolean isInlineImagePush)
public void setNotificationReceivedTimestampMillis(java.lang.Long notificationReceivedTimestampMillis)
public void setCustomNotificationId(java.lang.Integer customNotificationId)
public void setBigImageUrl(java.lang.String bigImageUrl)
Constants.APPBOY_PUSH_BIG_IMAGE_URL_KEY
in the "appboyExtras" bundle.bigImageUrl
- Url of expanded big image.public void setAppboyExtras(android.os.Bundle appboyExtras)
public void setContext(android.content.Context context)
@Deprecated public void setAppboyConfigurationProvider(AppboyConfigurationProvider appboyConfigurationProvider)
setConfigurationProvider(BrazeConfigurationProvider)
instead. Deprecated since 3/25/21public void setConfigurationProvider(BrazeConfigurationProvider configurationProvider)
public void setPushDuration(java.lang.Integer pushDuration)
public void setPushStory(boolean pushStory)
public void setPublicNotificationExtras(java.lang.String publicNotificationExtras)
public void setNotificationChannelId(java.lang.String notificationChannelId)
public void setNotificationCategory(java.lang.String notificationCategory)
public void setNotificationVisibility(java.lang.Integer notificationVisibility)
public void setNotificationBadgeNumber(java.lang.Integer notificationBadgeNumber)
public void setContentCardSyncData(java.lang.String contentCardSyncData)
public void setContentCardSyncUserId(java.lang.String contentCardSyncUserId)
public void setTitleText(java.lang.String title)
public void setContentText(java.lang.String content)
public void setLargeIcon(java.lang.String largeIcon)
public void setNotificationSound(java.lang.String notificationSound)
public void setSummaryText(java.lang.String summaryText)
public void setAccentColor(java.lang.Integer accentColor)
public void setBigSummaryText(java.lang.String bigSummaryText)
public void setBigTitleText(java.lang.String bigTitleText)
public static android.os.Bundle getAttachedAppboyExtras(android.os.Bundle notificationExtras)
notificationExtras
- Notification extras.public static java.lang.String getTemplateFieldAtIndex(int index, android.os.Bundle notificationExtras, java.lang.String actionFieldKeyTemplate)
index
- the index of the desired templatenotificationExtras
- Notification bundle containing the dataactionFieldKeyTemplate
- the template of the action fieldpublic static java.lang.String getTemplateFieldAtIndex(int index, android.os.Bundle notificationExtras, java.lang.String actionFieldKeyTemplate, java.lang.String defaultValue)
index
- the index of the desired templatenotificationExtras
- Notification bundle containing the dataactionFieldKeyTemplate
- the template of the action fielddefaultValue
- the default value to return if the value for the key in notificationExtras
is null.public static boolean getTemplateFieldAtIndex(int actionIndex, android.os.Bundle notificationExtras, java.lang.String actionFieldKeyTemplate, boolean defaultValue)
actionIndex
- the index of the desired templatenotificationExtras
- Notification bundle containing the dataactionFieldKeyTemplate
- the template of the action fielddefaultValue
- the default value to return if the value for the key in notificationExtras
is null or can't be parsed as a boolean.public static long getTemplateFieldAtIndex(int actionIndex, android.os.Bundle notificationExtras, java.lang.String actionFieldKeyTemplate, long defaultValue)
actionIndex
- the index of the desired templatenotificationExtras
- Notification bundle containing the dataactionFieldKeyTemplate
- the template of the action fielddefaultValue
- the default value to return if the value for the key in notificationExtras
is null or can't be parsed as a long.public static int getPushStoryGravityAtIndex(int actionIndex, android.os.Bundle notificationExtras, java.lang.String actionFieldKeyTemplate)
public java.lang.String toString()
toString
in class java.lang.Object