PushFyreAccelerate. Ignite. Broadcast.

Live Activities

Start, update, and end a Live Activity for a delivery, score, price, countdown, steps, or pass.

A Live Activity is one updating notification. The next update replaces the last one. It is not a new alert every time. Every plan can run an unlimited number of them. iOS still shows at most 5 from one app at a time, and an activity ends after 8 hours.

What each platform does

PlatformWhat you get
iPhone on iOS 16.2 or laterLock screen
iPhone 14 Pro and laterDynamic Island
iOS 17.2 or laterPushFyre can start the activity while the app is closed
iOS 18 or laterA large audience can share one Apple broadcast when a channel token is registered. Otherwise each phone is updated, up to the broadcast cap
Android 7 or laterAn ongoing notification that updates in place. No Dynamic Island and no status-bar live-update chip
Web (Chrome, Edge, Firefox)The notification is replaced in place. Safari support is limited. There is no lock-screen widget

Layouts

  • delivery needs title, status and progress from 0 to 100.
  • steps needs title, the step name, current and total.
  • score needs two names and two scores.
  • price needs a name, a value, a change and a change percent.
  • countdown needs a title and an end time. The clock runs on the phone.
  • pass needs a title, a code and a short detail.
  • dynamic draws only the blocks in state.dynamic: text, image and button blocks, which can sit inside rows and columns. It needs at least one block. A built-in layout ignores those blocks.
Dynamic layout
{
  "activityKey": "match-77",
  "layout": "dynamic",
  "audience": "broadcast",
  "state": {
    "dynamic": {
      "placement": "above",
      "blocks": [
        { "type": "text", "text": "India 182/4 (18.2)" },
        { "type": "row", "children": [
          { "type": "text", "text": "Need 24 from 10" },
          { "type": "button", "label": "Watch", "action": { "type": "url", "value": "https://example.com/live" } }
        ]}
      ]
    }
  }
}

On an update, leaving dynamic out keeps the blocks already stored. Sending an empty blocks list removes them.

Start, update and end

Call these from your server with the same three headers as send. The response is 202. Add an Idempotency-Key when a retry must not start a second activity.

bash
curl -X POST https://YOUR_API/api/v1/live-activities \
  -H "x-app-id: YOUR_APP_ID" \
  -H "x-tenant-id: YOUR_TENANT_ID" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"activityKey":"order-1042","layout":"delivery","audience":"user","externalUserId":"user-1","state":{"title":"Order 1042","status":"Out for delivery","progress":60}}'

PATCH /api/v1/live-activities/{key} sends the fields that changed. POST /api/v1/live-activities/{key}/end removes the card. Eight hours after the start, PushFyre marks the activity expired and sends that same end, so the card is removed on Android, the web and iOS.

On the device

  • Android. No extra call. Every Android device registered with PushFyre receives a broadcast, and a device or user activity reaches the phones it names. Each update replaces one ongoing notification. PushFyre.subscribeLiveActivity and unsubscribeLiveActivity are kept only so older code still compiles; they do nothing.
  • iOS. Add the PushFyreLiveActivity library, add a Widget Extension that includes PushFyreActivityWidget(), set NSSupportsLiveActivities to YES, and call PushFyreLiveActivity.enable() at launch. Until a token arrives, the start response keeps iOS off for that activity. The widget draws the lock screen, and on iPhone 14 Pro and later the Dynamic Island.
  • Web. After init, call PushFyre.liveActivities.subscribe("order-1042"). The service worker replaces one notification and ignores an older update. A Push Link subscriber receives a broadcast the same way, and an older update cannot replace a newer one there either.
Apple and Google can delay updates. People who turned notifications off receive nothing. Re-download PushFyreSDKWorker.js after a worker update so the site and Push Link pages use the new file.