public static class FcmSendMessageNotification.Builder extends Object
FcmSendMessageRequest
s.Constructor and Description |
---|
Builder()
Constructs a new builder for an FCM send message request.
|
Modifier and Type | Method and Description |
---|---|
FcmSendMessageNotification |
build()
Builds, validates, and returns the
FcmSendMessageNotification . |
FcmSendMessageNotification.Builder |
withBadge(String badge)
Sets the value of the badge on the home screen app icon.
|
FcmSendMessageNotification.Builder |
withBody(String body)
Sets the notification's body text.
|
FcmSendMessageNotification.Builder |
withBodyLocArgs(String bodyLocArgs)
Sets the variable string values to be used in place of the format specifiers in
bodyLocKey to use to localize the body text to the user's current localization.
|
FcmSendMessageNotification.Builder |
withBodyLocKey(String bodyLocKey)
Sets the key to the body string in the app's string resources to use to localize the body
text to the user's current localization.
|
FcmSendMessageNotification.Builder |
withClickAction(String clickAction)
Sets the action associated with a user click on the notification.
|
FcmSendMessageNotification.Builder |
withColor(String color)
Sets the notification's icon color, expressed in #rrggbb format.
|
FcmSendMessageNotification.Builder |
withIcon(String icon)
Sets the notification's icon.
|
FcmSendMessageNotification.Builder |
withSound(String sound)
Sets the sound to play when the device receives the notification.
|
FcmSendMessageNotification.Builder |
withTag(String tag)
Sets the identifier used to replace existing notifications in the notification drawer.
|
FcmSendMessageNotification.Builder |
withTitle(String title)
Sets the notification's title.
|
FcmSendMessageNotification.Builder |
withTitleLocArgs(String titleLocArgs)
Sets the variable string values to be used in place of the format specifiers in
titleLocKey to use to localize the title text to the user's current localization.
|
FcmSendMessageNotification.Builder |
withTitleLocKey(String titleLocKey)
Sets the key to the title string in the app's string resources to use to localize the
title text to the user's current localization.
|
public Builder()
public FcmSendMessageNotification.Builder withTitle(@Nonnull String title)
title
- the notification's title.public FcmSendMessageNotification.Builder withBody(@Nonnull String body)
body
- the notification's body text.public FcmSendMessageNotification.Builder withSound(@Nonnull String sound)
sound
- the sound to play when the device receives the notification.public FcmSendMessageNotification.Builder withClickAction(@Nonnull String clickAction)
clickAction
- the action associated with a user click on the notification.public FcmSendMessageNotification.Builder withBodyLocKey(@Nonnull String bodyLocKey)
bodyLocKey
- the key to the body string in the app's string resources to use to
localize the body text to the user's current localization.public FcmSendMessageNotification.Builder withBodyLocArgs(@Nonnull String bodyLocArgs)
bodyLocArgs
- the variable string values to be used in place of the format specifiers
in bodyLocKey to use to localize the body text to the user's current
localization.public FcmSendMessageNotification.Builder withTitleLocKey(@Nonnull String titleLocKey)
titleLocKey
- the key to the title string in the app's string resources to use to
localize the title text to the user's current localization.public FcmSendMessageNotification.Builder withTitleLocArgs(@Nonnull String titleLocArgs)
titleLocArgs
- the variable string values to be used in place of the format specifiers
in titleLocKey to use to localize the title text to the user's current
localization.public FcmSendMessageNotification.Builder withIcon(@Nonnull String icon)
icon
- the notification's icon.public FcmSendMessageNotification.Builder withTag(@Nonnull String tag)
tag
- the identifier used to replace existing notifications in the notification
drawer.public FcmSendMessageNotification.Builder withColor(@Nonnull String color)
color
- the notification's icon color, expressed in #rrggbb format.public FcmSendMessageNotification.Builder withBadge(@Nonnull String badge)
badge
- the value of the badge on the home screen app icon.public FcmSendMessageNotification build()
FcmSendMessageNotification
.