Public Method Summary
| MulticastMessage.Builder |
addAllFids(Collection<String> fids)
Adds a collection of Firebase Installation IDs (FIDs) to which the message
should be sent.
|
| MulticastMessage.Builder |
addAllTokens(Collection<String> tokens)
This method is deprecated.
Use
addAllFids(Collection) instead.
|
| MulticastMessage.Builder |
addFid(String fid)
Adds a Firebase Installation ID (FID) to which the message should be sent.
|
| MulticastMessage.Builder |
addToken(String token)
This method is deprecated.
Use
addFid(String) instead.
|
| MulticastMessage |
build()
Creates a new
MulticastMessage instance from the parameters set on this builder. |
| MulticastMessage.Builder |
putAllData(Map<String, String> map)
Adds all the key-value pairs in the given map to the message as data fields.
|
| MulticastMessage.Builder |
putData(String key, String value)
Adds the given key-value pair to the message as a data field.
|
| MulticastMessage.Builder |
setAndroidConfig(AndroidConfig androidConfig)
Sets the Android-specific information to be included in the message.
|
| MulticastMessage.Builder |
setApnsConfig(ApnsConfig apnsConfig)
Sets the information specific to APNS (Apple Push Notification Service).
|
| MulticastMessage.Builder |
setFcmOptions(FcmOptions fcmOptions)
Sets the
FcmOptions, which can be overridden by the platform-specific fcm_options fields. |
| MulticastMessage.Builder |
setNotification(Notification notification)
Sets the notification information to be included in the message.
|
| MulticastMessage.Builder |
setWebpushConfig(WebpushConfig webpushConfig)
Sets the Webpush-specific information to be included in the message.
|
Inherited Method Summary
Public Methods
public MulticastMessage.Builder addAllFids (Collection<String> fids)
Adds a collection of Firebase Installation IDs (FIDs) to which the message
should be sent. Up to 500 tokens and FIDs combined can be specified on a
single instance of MulticastMessage.
Parameters
| fids | Collection of Firebase Installation IDs. |
|---|
Returns
- This builder.
public MulticastMessage.Builder addAllTokens (Collection<String> tokens)
This method is deprecated.
Use addAllFids(Collection) instead.
Adds a collection of tokens to which the message should be sent. Up to 500
tokens and FIDs combined can be specified on a single instance of
MulticastMessage.
Parameters
| tokens | Collection of Firebase device registration tokens. |
|---|
Returns
- This builder.
public MulticastMessage.Builder addFid (String fid)
Adds a Firebase Installation ID (FID) to which the message should be sent.
Up to 500 tokens and FIDs combined can be specified on a single instance
of MulticastMessage.
Parameters
| fid | A non-null, non-empty Firebase Installation ID. |
|---|
Returns
- This builder.
public MulticastMessage.Builder addToken (String token)
This method is deprecated.
Use addFid(String) instead.
Adds a token to which the message should be sent. Up to 500 tokens
and FIDs combined can be specified on a single instance of
MulticastMessage.
Parameters
| token | A non-null, non-empty Firebase device registration token. |
|---|
Returns
- This builder.
public MulticastMessage build ()
Creates a new MulticastMessage instance from the parameters set on this builder.
Returns
- A new
MulticastMessageinstance.
Throws
| IllegalArgumentException | If any of the parameters set on the builder are invalid. |
|---|
public MulticastMessage.Builder putAllData (Map<String, String> map)
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.
Parameters
| map | A non-null map of data fields. Map must not contain null keys or values. |
|---|
Returns
- This builder.
public MulticastMessage.Builder putData (String key, String value)
Adds the given key-value pair to the message as a data field. Key or the value may not be null.
Parameters
| key | Name of the data field. Must not be null. |
|---|---|
| value | Value of the data field. Must not be null. |
Returns
- This builder.
public MulticastMessage.Builder setAndroidConfig (AndroidConfig androidConfig)
Sets the Android-specific information to be included in the message.
Parameters
| androidConfig | An AndroidConfig instance. |
|---|
Returns
- This builder.
public MulticastMessage.Builder setApnsConfig (ApnsConfig apnsConfig)
Sets the information specific to APNS (Apple Push Notification Service).
Parameters
| apnsConfig | An ApnsConfig instance. |
|---|
Returns
- This builder.
public MulticastMessage.Builder setFcmOptions (FcmOptions fcmOptions)
Sets the FcmOptions, which can be overridden by the platform-specific fcm_options fields.
public MulticastMessage.Builder setNotification (Notification notification)
Sets the notification information to be included in the message.
Parameters
| notification | A Notification instance. |
|---|
Returns
- This builder.
public MulticastMessage.Builder setWebpushConfig (WebpushConfig webpushConfig)
Sets the Webpush-specific information to be included in the message.
Parameters
| webpushConfig | A WebpushConfig instance. |
|---|
Returns
- This builder.