Live Activities
Live Activities — a live, updating view of an in-progress event.
// access
client.live_activitiesLive Activities — a live, updating view of an in-progress event.
iOS renders it on the Lock Screen / Dynamic Island; Android as an ongoing live notification. The classic server-side shape: start when the order/ride/match begins, update as its status changes, end when it's done.
iOS needs the APNs key configured in the console (Live Activities cannot go through FCM) and a Widget Extension in the app. Android needs no extra setup.
LiveActivities
classclient.live_activities
Extends Resource.
activity()
methoddef activity(activity_type_or_id, activity_id=None) -> LiveActivityBuilderStart a fluent activity.
activity(type, id) to start one; activity(id) to update or end
an existing one (the type is only needed at start).
Parameters
Prop
Type
Returns LiveActivityBuilder
template()
methoddef template(template, activity_id) -> LiveActivityBuilderA templated activity: template is a template key from the Nexus
console (e.g. "order_tracking") or an inline design. Send only data.
Parameters
Prop
Type
Returns LiveActivityBuilder
start_template()
methoddef start_template(template, activity_id, data=None, *, distinct_ids=None, lang=None, alert=None, attributes=None, stale_date=None, priority=None) -> Dict[str, Any]Start a templated activity. data: step, state, progress,
etaAt (unix s), values. Each device gets its own language unless
lang forces one. Returns {ios, android, iosTargets, iosWarning?}.
Parameters
Prop
Type
Returns Dict[str, Any]
update_data()
methoddef update_data(activity_id, data, *, stale_date=None, priority=None) -> Dict[str, Any]Update a templated activity with partial data — merged server-side
(None inside data clears a field).
Parameters
Prop
Type
Returns Dict[str, Any]
start()
methoddef start(activity_type, activity_id, content_state=None, *, distinct_ids=None, attributes=None, stale_date=None, priority=None) -> Dict[str, Any]Start an activity. Omit distinct_ids for a shared activity.
Returns {ios, android} — how many devices were reached.
Parameters
Prop
Type
Returns Dict[str, Any]
update()
methoddef update(activity_id, content_state=None, *, stale_date=None, priority=None) -> Dict[str, Any]Push a new content state. priority 5 = routine (unmetered),
10 = immediate (metered).
Parameters
Prop
Type
Returns Dict[str, Any]
end()
methoddef end(activity_id, content_state=None, *, data=None, dismissal_date=None) -> Dict[str, Any]End the activity, optionally with a final state and dismissal time.
Templated: data is the final state, e.g. {"step": "completed"}.
Parameters
Prop
Type
Returns Dict[str, Any]
register_push_to_start_token()
methoddef register_push_to_start_token(activity_type, token, *, distinct_id=None, device_key=None) -> Dict[str, Any]Register an iOS push-to-start token (normally the client SDK's job).
Parameters
Prop
Type
Returns Dict[str, Any]
register_activity()
methoddef register_activity(activity_id, activity_type, *, platform='ios', update_token=None, distinct_id=None, content_state=None) -> Dict[str, Any]Register a running activity instance's update token.
Parameters
Prop
Type
Returns Dict[str, Any]
event()
methoddef event(activity_id, type, *, platform=None) -> Dict[str, Any]Report a delivery receipt / click / failure for analytics.
Parameters
Prop
Type
Returns Dict[str, Any]
