| java.lang.Object | |
| ↳ | com.google.firebase.messaging.AndroidNotification.Builder |
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| AndroidNotification.Builder |
addAllBodyLocalizationArgs(List<String> args)
Adds a list of resource keys that will be used in place of the format specifiers in
bodyLocKey. | ||||||||||
| AndroidNotification.Builder |
addAllTitleLocalizationArgs(List<String> args)
Adds a list of resource keys that will be used in place of the format specifiers in
titleLocKey. | ||||||||||
| AndroidNotification.Builder |
addBodyLocalizationArg(String arg)
Adds a resource key string that will be used in place of the format specifiers in
bodyLocKey. | ||||||||||
| AndroidNotification.Builder |
addTitleLocalizationArg(String arg)
Adds a resource key string that will be used in place of the format specifiers in
titleLocKey. | ||||||||||
| AndroidNotification |
build()
Creates a new
AndroidNotification instance from the parameters set on this builder. | ||||||||||
| AndroidNotification.Builder |
setBody(String body)
Sets the body of the Android notification.
| ||||||||||
| AndroidNotification.Builder |
setBodyLocalizationKey(String bodyLocKey)
Sets the key of the body string in the app's string resources to use to localize the body
text.
| ||||||||||
| AndroidNotification.Builder |
setChannelId(String channelId)
Sets the Android notification channel ID (new in Android O).
| ||||||||||
| AndroidNotification.Builder |
setClickAction(String clickAction)
Sets the action associated with a user click on the notification.
| ||||||||||
| AndroidNotification.Builder |
setColor(String color)
Sets the notification icon color.
| ||||||||||
| AndroidNotification.Builder |
setIcon(String icon)
Sets the icon of the Android notification.
| ||||||||||
| AndroidNotification.Builder |
setSound(String sound)
Sets the sound to be played when the device receives the notification.
| ||||||||||
| AndroidNotification.Builder |
setTag(String tag)
Sets the notification tag.
| ||||||||||
| AndroidNotification.Builder |
setTitle(String title)
Sets the title of the Android notification.
| ||||||||||
| AndroidNotification.Builder |
setTitleLocalizationKey(String titleLocKey)
Sets the key of the title string in the app's string resources to use to localize the title
text.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Adds a list of resource keys that will be used in place of the format specifiers in
bodyLocKey.
| args | List of resource key strings. |
|---|
Adds a list of resource keys that will be used in place of the format specifiers in
titleLocKey.
| args | List of resource key strings. |
|---|
Adds a resource key string that will be used in place of the format specifiers in
bodyLocKey.
| arg | Resource key string. |
|---|
Adds a resource key string that will be used in place of the format specifiers in
titleLocKey.
| arg | Resource key string. |
|---|
Creates a new AndroidNotification instance from the parameters set on this builder.
AndroidNotification instance.| IllegalArgumentException | If any of the parameters set on the builder are invalid. |
|---|
Sets the body of the Android notification. When provided, overrides the body sent
via Notification.
| body | Body of the notification. |
|---|
Sets the key of the body string in the app's string resources to use to localize the body text.
| bodyLocKey | Resource key string. |
|---|
Sets the Android notification channel ID (new in Android O). The app must create a channel with this channel ID before any notification with this channel ID is received. If you don't send this channel ID in the request, or if the channel ID provided has not yet been created by the app, FCM uses the channel ID specified in the app manifest.
| channelId | The notification's channel ID. |
|---|
Sets 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.
| clickAction | Click action name. |
|---|
Sets the notification icon color.
| color | Color specified in the #rrggbb format. |
|---|
Sets the icon of the Android notification.
| icon | Icon resource for the notification. |
|---|
Sets the sound to be played when the device receives the notification.
| sound | File name of the sound resource or "default". |
|---|
Sets the notification tag. This is an identifier used to replace existing notifications in the notification drawer. If not specified, each request creates a new notification.
| tag | Notification tag. |
|---|
Sets the title of the Android notification. When provided, overrides the title set
via Notification.
| title | Title of the notification. |
|---|
Sets the key of the title string in the app's string resources to use to localize the title text.
| titleLocKey | Resource key string. |
|---|