Modifier and Type | Class and Description |
---|---|
static class |
FCM.Builder.FCMNotificationType
The available notification types of the FCM notification message.
|
static class |
FCM.Builder.FCMPriority
Determines the priority of the notification.
|
static class |
FCM.Builder.Visibility
Determines visibility of the notification.
|
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
FCM |
build() |
FCM.Builder |
collapseKey(String collapseKey) |
FCM.Builder |
delayWhileIdle(Boolean delayWhileIdle) |
FCM.Builder |
icon(String icon) |
FCM.Builder |
interactiveCategory(String interactiveCategory) |
FCM.Builder |
lights(FCM.FCMLights lights) |
FCM.Builder |
payload(org.json.JSONObject payload) |
FCM.Builder |
priority(FCM.Builder.FCMPriority priority) |
FCM.Builder |
sound(String sound) |
FCM.Builder |
style(FCM.FCMStyle style) |
FCM.Builder |
sync(Boolean sync) |
FCM.Builder |
timeToLive(Integer timeToLive) |
FCM.Builder |
type(FCM.Builder.FCMNotificationType type) |
FCM.Builder |
visibility(FCM.Builder.Visibility visibility) |
public final FCM.Builder delayWhileIdle(Boolean delayWhileIdle)
delayWhileIdle
- When this parameter is set to true, it indicates that the
message should not be sent until the device becomes
active.public final FCM.Builder timeToLive(Integer timeToLive)
timeToLive
- This parameter specifies the duration (in seconds) for
which the message should be kept in FCM, if the device is
offline.public final FCM.Builder collapseKey(String collapseKey)
collapseKey
- The parameter identifies a group of messages.public final FCM.Builder payload(org.json.JSONObject payload)
payload
- Custom JSON payload that will be sent as part of the
notification message.public final FCM.Builder sync(Boolean sync)
sync
- Device group messaging makes it possible for every app
instance in a group to reflect the latest messaging state.public final FCM.Builder sound(String sound)
sound
- The sound file (on device) that will be attempted to play
when the notification arrives on the device.public final FCM.Builder interactiveCategory(String interactiveCategory)
interactiveCategory
- The category identifier to be used for the interactive
push notifications.public final FCM.Builder priority(FCM.Builder.FCMPriority priority)
priority
- A string value that indicates the priority of this
notification. Allowed values are 'max', 'high', 'default',
'low' and 'min'. High/Max priority notifications along
with 'sound' field may be used for Heads up notification
in Android 5.0 or higher.sampleval='low' , sound (string,
optional): The sound file (on device) that will be
attempted to play when the notification arrives on the
device.public final FCM.Builder style(FCM.FCMStyle style)
style
- Options to specify for Android expandable notifications.
The types of expandable notifications are
picture_notification, bigtext_notification,
inbox_notification.public final FCM.Builder visibility(FCM.Builder.Visibility visibility)
visibility
- private/public - Visibility of this notification, which
affects how and when the notifications are revealed on a
secure locked screen.public final FCM.Builder icon(String icon)
icon
- Specify the name of the icon to be displayed for the
notification. Make sure the icon is already packaged with
the client application.public final FCM.Builder lights(FCM.FCMLights lights)
lights
- Allows setting the notification LED color on receiving
push notification.public final FCM.Builder type(FCM.Builder.FCMNotificationType type)
type
- {'DEFAULT', 'SILENT'}Copyright © 2019. All rights reserved.