Remote Firebase notification details.
This class maps to the fields of a notification message.
Public Method Summary
String |
getBody()
Gets the body of the notification, or null if not set.
|
String[] |
getBodyLocalizationArgs()
Gets the variable string values to be used as format specifiers in the body
localization key, or null if not set.
|
String |
getBodyLocalizationKey()
Gets the string resource name to use to localize the body of the notification,
or null if not set.
|
String |
getChannelId()
Gets the channel id from the notification, or null if not set.
|
String |
getClickAction()
Gets the action to be performed on the user opening the notification, or null
if not set.
|
String |
getColor()
Gets the color of the notification, or null if not set.
|
boolean |
getDefaultLightSettings()
Gets whether or not the notification uses the default notification light
settings.
|
boolean |
getDefaultSound()
Gets whether or not the notification uses the default sound.
|
boolean |
getDefaultVibrateSettings()
Gets whether or not the notification uses the default vibrate pattern.
|
Long |
getEventTime()
Gets the
eventTime from the notification.
|
String |
getIcon()
Gets the image resource name of the icon of the notification, or null if not
set.
|
Uri |
getImageUrl()
Gets the image URL from the notification.
|
int[] |
getLightSettings()
Gets the
lightSettings from the notification.
|
Uri |
getLink()
Gets the deep link from the notification, or null if not set.
|
boolean |
getLocalOnly()
Gets whether or not this notification is only relevant to the current device.
|
Integer |
getNotificationCount()
Gets the
notificationCount from the notification.
|
Integer |
getNotificationPriority()
Gets the
notificationPriority from the notification.
|
String |
getSound()
Gets the sound to be played when the notification is shown, or null if not set.
|
boolean |
getSticky()
Gets whether or not the notification is considered sticky.
|
String |
getTag()
Gets the tag of the notification, or null if not set.
|
String |
getTicker()
Gets the ticker text from the notification.
|
String |
getTitle()
Gets the title of the notification, or null if not set.
|
String[] |
getTitleLocalizationArgs()
Gets the variable string values to be used as format specifiers in the title
localization key, or null if not set.
|
String |
getTitleLocalizationKey()
Gets the string resource name to use to localize the title of the notification,
or null if not set.
|
long[] |
getVibrateTimings()
Gets the
vibrateTimings from the notification.
|
Integer |
getVisibility()
Gets the
visibility from the notification.
|
Inherited Method Summary
Public Methods
public String getBody ()
Gets the body of the notification, or null if not set.
public String[] getBodyLocalizationArgs ()
Gets the variable string values to be used as format specifiers in the body localization key, or null if not set.
public String getBodyLocalizationKey ()
Gets the string resource name to use to localize the body of the notification, or null if not set.
public String getChannelId ()
Gets the channel id from the notification, or null if not set.
Note that this method does not perform verification on the existence of a channel, nor does it fallback to the manifest defined default or the default FCM channel.
public String getClickAction ()
Gets the action to be performed on the user opening the notification, or null if not set.
The action is to open an Activity with matching intent filter.
public String getColor ()
Gets the color of the notification, or null if not set.
Color is expressed in #rrggbb format.
public boolean getDefaultLightSettings ()
Gets whether or not the notification uses the default notification light settings.
See details about defaultLightSettings
in
FCM Reference: HTTP v1 API.
Returns
true
if it is set totrue
; Otherwisefalse
.
public boolean getDefaultSound ()
Gets whether or not the notification uses the default sound.
See details about defaultSound
in
FCM Reference: HTTP v1 API.
Returns
true
if it is set totrue
; Otherwisefalse
.
public boolean getDefaultVibrateSettings ()
Gets whether or not the notification uses the default vibrate pattern.
See details about defaultVibrateTimings
in
FCM Reference: HTTP v1 API.
Returns
true
if it is set totrue
; Otherwisefalse
.
public Long getEventTime ()
Gets the eventTime
from the notification.
See details about eventTime
in
FCM Reference: HTTP v1 API.
public String getIcon ()
Gets the image resource name of the icon of the notification, or null if not set.
public Uri getImageUrl ()
Gets the image URL from the notification.
Returns
- The image URL if it was set, null otherwise.
public int[] getLightSettings ()
Gets the lightSettings
from the notification.
lightSettings
is an primitive integer array of size three that includes
color
, lightOnDuration
and lightOffDuration
respectively.
See details about lightSettings
in
FCM Reference: HTTP v1 API.
public Uri getLink ()
Gets the deep link from the notification, or null if not set.
public boolean getLocalOnly ()
Gets whether or not this notification is only relevant to the current device.
See details about localOnly
in
FCM Reference: HTTP v1 API.
Returns
true
if it is set totrue
; Otherwisefalse
.
public Integer getNotificationCount ()
Gets the notificationCount
from the notification.
See details about notificationCount
in
FCM Reference: HTTP v1 API.
public Integer getNotificationPriority ()
Gets the notificationPriority
from the notification.
See details about notificationPriority
in
FCM Reference: HTTP v1 API.
public String getSound ()
Gets the sound to be played when the notification is shown, or null if not set.
This will be either a raw resource name, or "default" for the user's default notification sound.
public boolean getSticky ()
Gets whether or not the notification is considered sticky.
See details about sticky
in
FCM Reference: HTTP v1 API.
Returns
true
if it is set totrue
; Otherwisefalse
.
public String getTag ()
Gets the tag of the notification, or null if not set.
public String getTicker ()
Gets the ticker text from the notification.
public String getTitle ()
Gets the title of the notification, or null if not set.
public String[] getTitleLocalizationArgs ()
Gets the variable string values to be used as format specifiers in the title localization key, or null if not set.
public String getTitleLocalizationKey ()
Gets the string resource name to use to localize the title of the notification, or null if not set.
public long[] getVibrateTimings ()
Gets the vibrateTimings
from the notification.
See details about vibrateTimings
in
FCM Reference: HTTP v1 API.
public Integer getVisibility ()
Gets the visibility
from the notification.
See details about visibility
in
FCM Reference: HTTP v1 API.