| java.lang.Object | |
| ↳ | com.google.firebase.messaging.WebpushNotification.Builder |
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| WebpushNotification.Builder |
addAction(WebpushNotification.Action action)
Adds a notification action to the notification.
| ||||||||||
| WebpushNotification.Builder |
addAllActions(List<WebpushNotification.Action> actions)
Adds all the actions in the given list to the notification.
| ||||||||||
| WebpushNotification |
build()
Creates a new
WebpushNotification from the parameters set on this builder. | ||||||||||
| WebpushNotification.Builder |
putAllCustomData(Map<String, Object> fields)
Puts all the key-value pairs in the specified map to the notification.
| ||||||||||
| WebpushNotification.Builder |
putCustomData(String key, Object value)
Puts a custom key-value pair to the notification.
| ||||||||||
| WebpushNotification.Builder |
setBadge(String badge)
Sets the URL of the image used to represent the notification when there is
not enough space to display the notification itself.
| ||||||||||
| WebpushNotification.Builder |
setBody(String body)
Sets the body text of the notification.
| ||||||||||
| WebpushNotification.Builder |
setData(Object data)
Sets any arbitrary data that should be associated with the notification.
| ||||||||||
| WebpushNotification.Builder |
setDirection(WebpushNotification.Direction direction)
Sets the direction in which to display the notification.
| ||||||||||
| WebpushNotification.Builder |
setIcon(String icon)
Sets the URL to the icon of the notification.
| ||||||||||
| WebpushNotification.Builder |
setImage(String image)
Sets the URL of an image to be displayed in the notification.
| ||||||||||
| WebpushNotification.Builder |
setLanguage(String language)
Sets the language of the notification.
| ||||||||||
| WebpushNotification.Builder |
setRenotify(boolean renotify)
Sets whether the user should be notified after a new notification replaces an old one.
| ||||||||||
| WebpushNotification.Builder |
setRequireInteraction(boolean requireInteraction)
Sets whether a notification should remain active until the user clicks or dismisses it,
rather than closing automatically.
| ||||||||||
| WebpushNotification.Builder |
setSilent(boolean silent)
Sets whether the notification should be silent.
| ||||||||||
| WebpushNotification.Builder |
setTag(String tag)
Sets an identifying tag on the notification.
| ||||||||||
| WebpushNotification.Builder |
setTimestampMillis(long timestampMillis)
Sets a timestamp value in milliseconds on the notification.
| ||||||||||
| WebpushNotification.Builder |
setTitle(String title)
Sets the title text of the notification.
| ||||||||||
| WebpushNotification.Builder |
setVibrate(int[] pattern)
Sets a vibration pattern for the device's vibration hardware to emit
when the notification fires.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Adds a notification action to the notification.
| action | A non-null WebpushNotification.Action. |
|---|
Adds all the actions in the given list to the notification.
| actions | A non-null list of actions. |
|---|
Creates a new WebpushNotification from the parameters set on this builder.
WebpushNotification instance.
Puts all the key-value pairs in the specified map to the notification.
| fields | A non-null map. Map must not contain null keys or values. |
|---|
Puts a custom key-value pair to the notification.
| key | A non-null key. |
|---|---|
| value | A non-null, json-serializable value. |
Sets the URL of the image used to represent the notification when there is not enough space to display the notification itself.
| badge | Badge URL. |
|---|
Sets the body text of the notification.
| body | Body text. |
|---|
Sets any arbitrary data that should be associated with the notification.
| data | A JSON-serializable object. |
|---|
Sets the direction in which to display the notification.
| direction | Direction enum value. |
|---|
Sets the URL to the icon of the notification.
| icon | Icon URL. |
|---|
Sets the URL of an image to be displayed in the notification.
| image | Image URL |
|---|
Sets the language of the notification.
| language | Notification language. |
|---|
Sets whether the user should be notified after a new notification replaces an old one.
| renotify | true to notify the user on replacement. |
|---|
Sets whether a notification should remain active until the user clicks or dismisses it, rather than closing automatically.
| requireInteraction | true to keep the notification active until user interaction. |
|---|
Sets whether the notification should be silent.
| silent | true to indicate that the notification should be silent. |
|---|
Sets an identifying tag on the notification.
| tag | A tag to be associated with the notification. |
|---|
Sets a timestamp value in milliseconds on the notification.
| timestampMillis | A timestamp value as a number. |
|---|
Sets the title text of the notification.
| title | Title text. |
|---|
Sets a vibration pattern for the device's vibration hardware to emit when the notification fires.
| pattern | An integer array representing a vibration pattern. |
|---|