Live Update payload
A Live Update is sent as a Firebase Cloud Messaging (FCM) data message. The Live Update properties are sent as a JSON-encoded string under the adb_liveupdate_data key. Each push carries one state of the Live Update: start, update, or end.
Configuration
This payload is rendered by the Live Updates plugin. Add the plugin to your app and register it with MobileCore.addPlugins(...), as shown in Register the plugin. When the plugin is not registered, the push is dropped.
Data keys
adb_liveupdate_data_xdmadb_title key.The standard Android push keys documented on Push notification payload keys, such as adb_title and adb_body, are not used to render a Live Update. The plugin builds the notification from the adb_liveupdate_data properties only.
Properties
Keys inside the adb_liveupdate_data object:
notification_idnotification_channel_idevent_typestart, update, or end. A push with any other value is dropped.timestampnotification_id and notification_channel_id.titlebodycritical_textwhendismiss_afterend push. When positive, the notification is removed this many seconds after the push arrives. When absent, the notification stays on the device as an ongoing notification until the user or your app removes it.priorityPRIORITY_MAX, PRIORITY_HIGH, PRIORITY_LOW, or PRIORITY_MIN. Any other value, or no value, uses the default priority.topic_namecontent_statepayload.contentState to build the style.Example
A start push, as sent through FCM:
{
"message":{
"android":{
"data":{
"_xdm": "<AJO_TRACKING_DATA>",
"adb_liveupdate_data": "{\"notification_id\":\"order_1234\",\"notification_channel_id\":\"live_updates_channel\",\"event_type\":\"start\",\"timestamp\":1790000000,\"title\":\"Order on the way\",\"body\":\"Your order has left the store.\",\"critical_text\":\"20 min\",\"topic_name\":\"order_1234\",\"content_state\":{\"custom_key_template_type\":\"progress\",\"custom_key_progress\":10}}"
}
}
}
}
data-variant=info
data-slots=text
adb_liveupdate_data is a JSON-encoded string, because FCM data messages only allow string values. The examples below show its decoded value. Set timestamp to the current time in epoch seconds when you send a push; the plugin drops pushes more than 28 days old.Start
{
"notification_id": "order_1234",
"notification_channel_id": "live_updates_channel",
"event_type": "start",
"timestamp": 1790000000,
"title": "Order on the way",
"body": "Your order has left the store.",
"critical_text": "20 min",
"topic_name": "order_1234",
"content_state": {
"custom_key_template_type": "progress",
"custom_key_progress": 10
}
}
Update
Same notification_id and notification_channel_id, with a newer timestamp. The notification is updated in place.
{
"notification_id": "order_1234",
"notification_channel_id": "live_updates_channel",
"event_type": "update",
"timestamp": 1790000600,
"title": "Order on the way",
"body": "Your order is 5 minutes away.",
"critical_text": "5 min",
"topic_name": "order_1234",
"content_state": {
"custom_key_template_type": "progress",
"custom_key_progress": 80
}
}
End
dismiss_after removes the notification 300 seconds after this push arrives. Without dismiss_after, the notification stays on the device after the end push, as an ongoing notification, until the user or your app removes it.
{
"notification_id": "order_1234",
"notification_channel_id": "live_updates_channel",
"event_type": "end",
"timestamp": 1790001200,
"title": "Order delivered",
"body": "Enjoy your meal.",
"critical_text": "Delivered",
"dismiss_after": 300,
"topic_name": "order_1234",
"content_state": {
"custom_key_template_type": "progress",
"custom_key_progress": 100
}
}
The content_state keys in these examples are app-defined. They match the style provider in the tutorial.
Delivery rules
- Updates in place. Pushes with the same
notification_idreplace the same notification. - Ordering. Each push must have a newer
timestampthan the last push the plugin accepted for the samenotification_idandnotification_channel_id. Older and duplicate pushes are dropped. - Removal after
end. The SDK removes the notification only when theendpush has a positivedismiss_aftervalue. Otherwise, it stays until the user or your app removes it. - After
end. A push that arrives afterendwith the samenotification_idand a newertimestampposts the notification again. To block it, use an interceptor.
See also: Push notification payload keys.