| java.lang.Object | |
| ↳ | com.google.firebase.messaging.Message.Builder |
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Message |
build()
Creates a new
Message instance from the parameters set on this builder. | ||||||||||
| Message.Builder |
putAllData(Map<String, String> map)
Adds all the key-value pairs in the given map to the message as data fields.
| ||||||||||
| Message.Builder |
putData(String key, String value)
Adds the given key-value pair to the message as a data field.
| ||||||||||
| Message.Builder |
setAndroidConfig(AndroidConfig androidConfig)
Sets the Android-specific information to be included in the message.
| ||||||||||
| Message.Builder |
setApnsConfig(ApnsConfig apnsConfig)
Sets the information specific to APNS (Apple Push Notification Service).
| ||||||||||
| Message.Builder |
setCondition(String condition)
Sets the FCM condition to which the message should be sent.
| ||||||||||
| Message.Builder |
setFcmOptions(FcmOptions fcmOptions)
Sets the
FcmOptions, which can be overridden by the platform-specific fcm_options fields. | ||||||||||
| Message.Builder |
setNotification(Notification notification)
Sets the notification information to be included in the message.
| ||||||||||
| Message.Builder |
setToken(String token)
Sets the registration token of the device to which the message should be sent.
| ||||||||||
| Message.Builder |
setTopic(String topic)
Sets the name of the FCM topic to which the message should be sent.
| ||||||||||
| Message.Builder |
setWebpushConfig(WebpushConfig webpushConfig)
Sets the Webpush-specific information to be included in the message.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Adds all the key-value pairs in the given map to the message as data fields. None of the keys or values may be null.
| map | A non-null map of data fields. Map must not contain null keys or values. |
|---|
Adds the given key-value pair to the message as a data field. Key or the value may not be null.
| key | Name of the data field. Must not be null. |
|---|---|
| value | Value of the data field. Must not be null. |
Sets the Android-specific information to be included in the message.
| androidConfig | An AndroidConfig instance. |
|---|
Sets the information specific to APNS (Apple Push Notification Service).
| apnsConfig | An ApnsConfig instance. |
|---|
Sets the FCM condition to which the message should be sent.
| condition | A valid condition string (e.g. "'foo' in topics"). |
|---|
Sets the FcmOptions, which can be overridden by the platform-specific fcm_options fields.
Sets the notification information to be included in the message.
| notification | A Notification instance. |
|---|
Sets the registration token of the device to which the message should be sent.
| token | A valid device registration token. |
|---|
Sets the name of the FCM topic to which the message should be sent. Topic names may
contain the /topics/ prefix.
| topic | A valid topic name. |
|---|
Sets the Webpush-specific information to be included in the message.
| webpushConfig | A WebpushConfig instance. |
|---|