-
- All Implemented Interfaces:
-
com.onesignal.notifications.IDisplayableMutableNotification,com.onesignal.notifications.IDisplayableNotification,com.onesignal.notifications.IMutableNotification,com.onesignal.notifications.INotification
public final class Notification implements IDisplayableMutableNotificationThe notification the user received <br></br><br></br>.androidNotificationId - Android Notification ID assigned to the notification. Can be used to cancel or replace the notification .groupedNotifications - If the notification is a summary notification for a group, this will contain all notification payloads it was created from.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classNotification.ActionButtonList of action buttons on the notification.
-
Field Summary
Fields Modifier and Type Field Description private NotificationCompat.ExtendernotificationExtenderprivate final WaiterWithValue<Boolean>displayWaiterprivate List<Notification>groupedNotificationsprivate IntegerandroidNotificationIdprivate StringnotificationIdprivate StringtemplateNameprivate StringtemplateIdprivate Stringtitleprivate Stringbodyprivate JSONObjectadditionalDataprivate StringsmallIconprivate StringlargeIconprivate StringbigPictureprivate StringsmallIconAccentColorprivate StringlaunchURLprivate Stringsoundprivate StringledColorprivate IntegerlockScreenVisibilityprivate StringgroupKeyprivate StringgroupMessageprivate List<IActionButton>actionButtonsprivate StringfromProjectNumberprivate BackgroundImageLayoutbackgroundImageLayoutprivate StringcollapseIdprivate Integerpriorityprivate LongsentTimeprivate Integerttlprivate StringrawPayload
-
Constructor Summary
Constructors Constructor Description Notification(JSONObject payload, ITime time)Notification(List<Notification> groupedNotifications, JSONObject jsonPayload, Integer androidNotificationId, ITime time)
-
Method Summary
-
-
Constructor Detail
-
Notification
Notification(JSONObject payload, ITime time)
-
Notification
Notification(List<Notification> groupedNotifications, JSONObject jsonPayload, Integer androidNotificationId, ITime time)
-
-
Method Detail
-
getNotificationExtender
final NotificationCompat.Extender getNotificationExtender()
-
setNotificationExtender
final Unit setNotificationExtender(NotificationCompat.Extender notificationExtender)
-
getDisplayWaiter
final WaiterWithValue<Boolean> getDisplayWaiter()
Wake with true to display the notification, or false to discard it permanently.
-
getGroupedNotifications
List<Notification> getGroupedNotifications()
-
setGroupedNotifications
Unit setGroupedNotifications(List<Notification> groupedNotifications)
-
getAndroidNotificationId
Integer getAndroidNotificationId()
-
setAndroidNotificationId
Unit setAndroidNotificationId(Integer androidNotificationId)
-
getNotificationId
String getNotificationId()
-
setNotificationId
Unit setNotificationId(String notificationId)
-
getTemplateName
String getTemplateName()
-
setTemplateName
Unit setTemplateName(String templateName)
-
getTemplateId
String getTemplateId()
-
setTemplateId
Unit setTemplateId(String templateId)
-
getAdditionalData
JSONObject getAdditionalData()
-
setAdditionalData
Unit setAdditionalData(JSONObject additionalData)
-
getSmallIcon
String getSmallIcon()
-
setSmallIcon
Unit setSmallIcon(String smallIcon)
-
getLargeIcon
String getLargeIcon()
-
setLargeIcon
Unit setLargeIcon(String largeIcon)
-
getBigPicture
String getBigPicture()
-
setBigPicture
Unit setBigPicture(String bigPicture)
-
getSmallIconAccentColor
String getSmallIconAccentColor()
-
setSmallIconAccentColor
Unit setSmallIconAccentColor(String smallIconAccentColor)
-
getLaunchURL
String getLaunchURL()
-
setLaunchURL
Unit setLaunchURL(String launchURL)
-
getLedColor
String getLedColor()
-
setLedColor
Unit setLedColor(String ledColor)
-
getLockScreenVisibility
Integer getLockScreenVisibility()
-
setLockScreenVisibility
Unit setLockScreenVisibility(Integer lockScreenVisibility)
-
getGroupKey
String getGroupKey()
-
setGroupKey
Unit setGroupKey(String groupKey)
-
getGroupMessage
String getGroupMessage()
-
setGroupMessage
Unit setGroupMessage(String groupMessage)
-
getActionButtons
List<IActionButton> getActionButtons()
-
setActionButtons
Unit setActionButtons(List<IActionButton> actionButtons)
-
getFromProjectNumber
String getFromProjectNumber()
-
setFromProjectNumber
Unit setFromProjectNumber(String fromProjectNumber)
-
getBackgroundImageLayout
BackgroundImageLayout getBackgroundImageLayout()
-
setBackgroundImageLayout
Unit setBackgroundImageLayout(BackgroundImageLayout backgroundImageLayout)
-
getCollapseId
String getCollapseId()
-
setCollapseId
Unit setCollapseId(String collapseId)
-
getPriority
Integer getPriority()
-
setPriority
Unit setPriority(Integer priority)
-
getSentTime
Long getSentTime()
-
setSentTime
Unit setSentTime(Long sentTime)
-
getRawPayload
String getRawPayload()
-
setRawPayload
Unit setRawPayload(String rawPayload)
-
setExtender
Unit setExtender(NotificationCompat.Extender extender)
-
hasNotificationId
final Boolean hasNotificationId()
-
toJSONObject
final JSONObject toJSONObject()
-
-
-
-