| java.lang.Object | |
| ↳ | com.google.firebase.messaging.AndroidConfig.Builder |
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| AndroidConfig |
build()
Creates a new
AndroidConfig instance from the parameters set on this builder. | ||||||||||
| AndroidConfig.Builder |
putAllData(Map<String, String> map)
Adds all the key-value pairs in the given map to the message as data fields.
| ||||||||||
| AndroidConfig.Builder |
putData(String key, String value)
Adds the given key-value pair to the message as a data field.
| ||||||||||
| AndroidConfig.Builder |
setCollapseKey(String collapseKey)
Sets a collapse key for the message.
| ||||||||||
| AndroidConfig.Builder |
setDirectBootOk(boolean directBootOk)
Sets the
direct_boot_ok flag. | ||||||||||
| AndroidConfig.Builder |
setFcmOptions(AndroidFcmOptions androidFcmOptions)
Sets the
AndroidFcmOptions, which overrides values set in the FcmOptions
for Android messages. | ||||||||||
| AndroidConfig.Builder |
setNotification(AndroidNotification notification)
Sets the Android notification to be included in the message.
| ||||||||||
| AndroidConfig.Builder |
setPriority(AndroidConfig.Priority priority)
Sets the priority of the message.
| ||||||||||
| AndroidConfig.Builder |
setRestrictedPackageName(String restrictedPackageName)
Sets the package name of the application where the registration tokens must match in order
to receive the message.
| ||||||||||
| AndroidConfig.Builder |
setTtl(long ttl)
Sets the time-to-live duration of the message in milliseconds.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Creates a new AndroidConfig instance from the parameters set on this builder.
AndroidConfig instance.| IllegalArgumentException | If any of the parameters set on the builder are invalid. |
|---|
Adds all the key-value pairs in the given map to the message as data fields. None of the
keys and values may be null. When set, overrides any data fields set on the top-level
Message via putData(String, String) and
putAllData(Map).
| 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 and the value may not be
null. When set, overrides any data fields set on the top-level Message via
putData(String, String) and putAllData(Map).
| key | Name of the data field. Must not be null. |
|---|---|
| value | Value of the data field. Must not be null. |
Sets a collapse key for the message. Collapse key serves as an identifier for a group of messages that can be collapsed, so that only the last message gets sent when delivery can be resumed. A maximum of 4 different collapse keys may be active at any given time.
| collapseKey | A collapse key string. |
|---|
Sets the direct_boot_ok flag. If set to true, messages are delivered to
the app while the device is in direct boot mode.
Sets the AndroidFcmOptions, which overrides values set in the FcmOptions
for Android messages.
Sets the Android notification to be included in the message.
| notification | An AndroidNotification instance. |
|---|
Sets the priority of the message.
| priority | A value from the AndroidConfig.Priority enum. |
|---|
Sets the package name of the application where the registration tokens must match in order to receive the message.
| restrictedPackageName | A package name string. |
|---|
Sets the time-to-live duration of the message in milliseconds.
| ttl | Time-to-live duration in milliseconds. |
|---|