| java.lang.Object | |
| ↳ | com.google.firebase.messaging.Aps.Builder |
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Aps |
build()
Builds a new
Aps instance from the fields set on this builder. | ||||||||||
| Aps.Builder |
putAllCustomData(Map<String, Object> fields)
Puts all the key-value pairs in the specified map to the aps dictionary.
| ||||||||||
| Aps.Builder |
putCustomData(String key, Object value)
Puts a custom key-value pair to the aps dictionary.
| ||||||||||
| Aps.Builder |
setAlert(String alert)
Sets the alert field as a string.
| ||||||||||
| Aps.Builder |
setAlert(ApsAlert alert)
Sets the alert as a dictionary.
| ||||||||||
| Aps.Builder |
setBadge(int badge)
Sets the badge to be displayed with the message.
| ||||||||||
| Aps.Builder |
setCategory(String category)
Sets the notification type.
| ||||||||||
| Aps.Builder |
setContentAvailable(boolean contentAvailable)
Specifies whether to configure a background update notification.
| ||||||||||
| Aps.Builder |
setMutableContent(boolean mutableContent)
Specifies whether to set the
mutable-content property on the message. | ||||||||||
| Aps.Builder |
setSound(CriticalSound sound)
Sets the critical alert sound to be played with the message.
| ||||||||||
| Aps.Builder |
setSound(String sound)
Sets the sound to be played with the message.
| ||||||||||
| Aps.Builder |
setThreadId(String threadId)
Sets an app-specific identifier for grouping notifications.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Puts all the key-value pairs in the specified map to the aps dictionary.
| fields | A non-null map. Map must not contain null keys or values. |
|---|
Puts a custom key-value pair to the aps dictionary.
| key | A non-null key. |
|---|---|
| value | A non-null, json-serializable value. |
Sets the alert field as a string.
| alert | A string alert. |
|---|
Sets the badge to be displayed with the message. Set to 0 to remove the badge. When not invoked, the badge will remain unchanged.
| badge | An integer representing the badge. |
|---|
Sets the notification type.
| category | A string identifier. |
|---|
Specifies whether to configure a background update notification.
| contentAvailable | True to perform a background update. |
|---|
Specifies whether to set the mutable-content property on the message. When set, this
property allows clients to modify the notification via app extensions.
| mutableContent | True to make the content mutable via app extensions. |
|---|
Sets the critical alert sound to be played with the message.
| sound | A CriticalSound instance containing the alert sound configuration. |
|---|
Sets the sound to be played with the message. For critical alerts use the
setSound(CriticalSound) method.
| sound | Sound file name or "default". |
|---|
Sets an app-specific identifier for grouping notifications.
| threadId | A string identifier. |
|---|