Class GcmNotification.Builder
java.lang.Object
com.sap.mobile.services.client.push.GcmNotification.Builder
- Enclosing interface:
- GcmNotification
Firebase/Android specific notification parameter. See @see
Notifications
and data messages
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIf set, this field takes priority over the alert field of the notification elementbodyLocKey
should be used to retrieve the title from the localized resources of the app based on the user's language configuration.bodyLocArgs
(String bodyLocArgs) Deprecated.bodyLocArgsArray
(List<String> bodyLocArgsArray) List of body localization parametersbodyLocKey
(String bodyLocKey) Should be used to retrieve the title from the localized resources of the app based on the user's language configuration.build()
clickAction
(String clickAction) The action associated with a user click on the notification.collapseKey
(String collapseKey) Collapsible messages replace old messages with the same key with new messages with the same key.The notification's icon color, expressed in #rrggbb format.delayWhileIdle
(Boolean delayWhileIdle) Deprecated.usetimeToLive
insteadAllows you to implement a custom app icon for the message instead of the default.restrictedPackageName
(String restrictedPackageName) Android allows you to use one FCM service instance for multiple apps with different package names.Allows you to play a custom sound when the message is received.Notification with a tag replaces older notifications with the same tag on the device.timeToLive
(Duration timeToLive) When an app server posts a message to FCM and receives a message ID back, it does not mean that the message was already delivered to the device.If set, this field takes priority over the alert field of the notification elementtitleLocKey
should be used to retrieve the title from the localized resources of the app based on the user's language configuration.titleLocArgs
(String titleLocArgs) Deprecated.usetitleLocArgsArray
titleLocArgsArray
(List<String> titleLocArgsArray) List of title localization parameterstitleLocKey
(String titleLocKey) Should be used to retrieve the title from the localized resources of the app based on the user's language configuration.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
collapseKey
Collapsible messages replace old messages with the same key with new messages with the same key. Android can store up to 100 messages without collapsing.- See Also:
-
delayWhileIdle
Deprecated.usetimeToLive
insteadMessage delivery by FCM is delayed when the device is idle. -
timeToLive
When an app server posts a message to FCM and receives a message ID back, it does not mean that the message was already delivered to the device. Rather, it means that it was accepted for delivery. What happens to the message after it is accepted depends on many factors. This property can be used to deliver the message only in the next duration -
restrictedPackageName
Android allows you to use one FCM service instance for multiple apps with different package names. This property will restrict the message to apps with the given package name. -
title
If set, this field takes priority over the alert field of the notification elementtitleLocKey
should be used to retrieve the title from the localized resources of the app based on the user's language configuration. -
body
If set, this field takes priority over the alert field of the notification elementbodyLocKey
should be used to retrieve the title from the localized resources of the app based on the user's language configuration. -
icon
Allows you to implement a custom app icon for the message instead of the default. The icon resource must be present in the app resources. -
sound
Allows you to play a custom sound when the message is received. If set, this field takes priority over the sound field of the notification element. The custom sound resource must be present in the app resource folderres\raw
.default
selects the default notification sound. -
tag
Notification with a tag replaces older notifications with the same tag on the device. -
color
The notification's icon color, expressed in #rrggbb format. -
clickAction
The action associated with a user click on the notification. If specified, an activity with a matching intent filter is launched when a user clicks on the notification. -
bodyLocKey
Should be used to retrieve the title from the localized resources of the app based on the user's language configuration. -
bodyLocArgs
Deprecated.usebodyLocArgsArray
Serialized JSON list of body localization parameters -
bodyLocArgsArray
List of body localization parameters -
titleLocKey
Should be used to retrieve the title from the localized resources of the app based on the user's language configuration. -
titleLocArgs
Deprecated.usetitleLocArgsArray
Serialized JSON list of title localization parameters -
titleLocArgsArray
List of title localization parameters -
build
-
bodyLocArgsArray