-
- All Implemented Interfaces:
-
com.onesignal.notifications.INotification
public interface IDisplayableNotification implements INotification
An INotification that has the ability to be manually displayed to the device.
-
-
Method Summary
Modifier and Type Method Description abstract Unitdisplay()Display the notification on the device. abstract IntegergetAndroidNotificationId()Android notification id. abstract StringgetNotificationId()The OneSignal notification id. abstract StringgetTemplateName()The name of the OneSignal template that created this notification. abstract StringgetTemplateId()The id of the OneSignal tempalte that created this notification. abstract StringgetTitle()The title displayed to the user. abstract StringgetBody()The body displayed to the user. abstract JSONObjectgetAdditionalData()The key/value custom additional data specified when creating the notification. abstract StringgetSmallIcon()The small icon information specified when creating the notification. abstract StringgetLargeIcon()The large icon information specified when creating the notification. abstract StringgetBigPicture()The big picture information specified when creating the notification. abstract StringgetSmallIconAccentColor()The accent color of the small icon specified when creating the notification. abstract StringgetLaunchURL()The launch URL information specified when creating the notification. abstract StringgetSound()The sound information specified when creating the notification. abstract StringgetLedColor()The LED color information specified when creating the notification. abstract IntegergetLockScreenVisibility()The lock screen visibility information specified when creating the notification. abstract StringgetGroupKey()The group key information specified when creating the notification. abstract StringgetGroupMessage()The group message information specified when creating the notification. abstract List<IActionButton>getActionButtons()The action buttons specified when creating the notification. abstract StringgetFromProjectNumber()The from project information specified when creating the notification. abstract BackgroundImageLayoutgetBackgroundImageLayout()The background image layout information specified when creating the notification. abstract StringgetCollapseId()The collapse ID specified when creating the notification. abstract IntegergetPriority()The priority information specified when creating the notification. abstract LonggetSentTime()When this notification was sent by the backend. abstract IntegergetTtl()The TTL information specified when creating the notification. abstract List<INotification>getGroupedNotifications()When this notification is a summary notification, this will contain the list of notifications it summarizes. abstract StringgetRawPayload()The raw payload of the notification that came into the device. -
-
Method Detail
-
display
abstract Unit display()
Display the notification on the device. Typically this is only possible within a short time-frame (~30 seconds) after the notification is received on the device. See INotificationReceivedEvent and INotificationWillDisplayEvent for more information on how this might be used.
-
getAndroidNotificationId
abstract Integer getAndroidNotificationId()
Android notification id. Can later be used to dismiss the notification programmatically.
-
getNotificationId
abstract String getNotificationId()
The OneSignal notification id.
-
getTemplateName
abstract String getTemplateName()
The name of the OneSignal template that created this notification. If no template was used, this will be null.
-
getTemplateId
abstract String getTemplateId()
The id of the OneSignal tempalte that created this notification. If no template was used, this will be null.
-
getAdditionalData
abstract JSONObject getAdditionalData()
The key/value custom additional data specified when creating the notification.
-
getSmallIcon
abstract String getSmallIcon()
The small icon information specified when creating the notification.
-
getLargeIcon
abstract String getLargeIcon()
The large icon information specified when creating the notification.
-
getBigPicture
abstract String getBigPicture()
The big picture information specified when creating the notification.
-
getSmallIconAccentColor
abstract String getSmallIconAccentColor()
The accent color of the small icon specified when creating the notification.
-
getLaunchURL
abstract String getLaunchURL()
The launch URL information specified when creating the notification.
-
getLedColor
abstract String getLedColor()
The LED color information specified when creating the notification.
-
getLockScreenVisibility
abstract Integer getLockScreenVisibility()
The lock screen visibility information specified when creating the notification.
-
getGroupKey
abstract String getGroupKey()
The group key information specified when creating the notification.
-
getGroupMessage
abstract String getGroupMessage()
The group message information specified when creating the notification.
-
getActionButtons
abstract List<IActionButton> getActionButtons()
The action buttons specified when creating the notification.
-
getFromProjectNumber
abstract String getFromProjectNumber()
The from project information specified when creating the notification.
-
getBackgroundImageLayout
abstract BackgroundImageLayout getBackgroundImageLayout()
The background image layout information specified when creating the notification.
-
getCollapseId
abstract String getCollapseId()
The collapse ID specified when creating the notification.
-
getPriority
abstract Integer getPriority()
The priority information specified when creating the notification.
-
getSentTime
abstract Long getSentTime()
When this notification was sent by the backend.
-
getGroupedNotifications
abstract List<INotification> getGroupedNotifications()
When this notification is a summary notification, this will contain the list of notifications it summarizes.
-
getRawPayload
abstract String getRawPayload()
The raw payload of the notification that came into the device. This should only be used to access any data that is not yet represented in a property.
-
-
-
-