Layouts

Four layouts. Pick the one that matches the information.

LayoutUse it forExamples
progressSteps, or a value that grows toward a goal.An order, a delivery, a fundraiser.
pictureA photo that matters most.A pet match, a listing, a photo of the moment.
versusTwo sides with scores.A game, a match, an auction.
countdownOne moment in time. The clock runs on the phone.A launch, a kickoff, a deadline.

Set layout in the state on start. To change it later, send a new layout and that layout's fields in an update. One activity can show a score, then a photo, then the score again.

What each layout shows

On iPhone:

FieldProgressPictureVersusCountdown
primaryTextHeadlineCaptionNot shownNot shown
secondaryTextLine under the headlineText under the captionNot shownName next to the clock
headerIconUrlLogoSmall logoNot shownLogo
backgroundImageUrlBackgroundThe photoBackgroundNot shown
versusNot shownNot shownNames, scores, logos, statuses, center columnNot shown
Action buttonNot shownShownShownNot shown
Compact Dynamic Islandstage, then "N min", then a ringThe photo onlyScores and logosTime left

On every layout, an alert uses primaryText as its title and secondaryText as its body. Set both, even on a layout that does not show them.

On Android, every layout is a notification with a title and one line of text:

  • Title: primaryText. On Versus, the score ("Lincoln 14-7 Central"). On Countdown, the time left.
  • Text: secondaryText. On Versus, the center column, or the statuses when there is no center column.
  • Picture shows its photo when the user expands the notification.

Text that fits

Safe lengths for the smallest iPhone surface. Longer text is cut at the last whole word that fits, with no "...". Android wraps long text instead of cutting it. Check a design in the builder before sending it.

LayoutFieldCharacters
ProgressprimaryText17 with a logo, 21 without
ProgresssecondaryText28
ProgressStep labels (segments)12 with three steps, 21 with two
Progressstage7
PictureprimaryText27, over two lines
PicturesecondaryText48, over two lines
VersusleftName / rightName12 with a center column, 16 without
VersusleftStatus / rightStatus14
VersuscenterLabel / centerValue10
VersusleftScore / rightScore2 digits with logos and a center column
CountdownsecondaryText20
AnyactionLabel10
Anybrand.name18

Images that fit

Use WebP. PNG and JPEG also work. SVG does not. The builder saves every image as WebP, 400 pixels wide, cut to the shape of its slot. Use the same sizes:

FieldShapeSize
headerIconUrl, lockScreenImageUrl, androidIconUrl, and the versus logosSquare400 x 400
backgroundImageUrlWide, 2.34 to 1400 x 171
islandImageUrlAlmost square, 1.12 to 1 (2.12 to 1 when immersive is true)400 x 358
androidImageUrl1.39 to 1400 x 288

Give logos a transparent background.

Examples

Progress with steps

Each step turns complete as the order moves.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
curl -X POST https://api.webliveactivity.com/api/start \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: wla_your_key' \
  -d '{
  "widgetContainerId": "pizza-tracker",
  "brand": {
    "title": "Order #1234"
  },
  "state": {
    "layout": "progress",
    "primaryText": "In the oven now",
    "secondaryText": "Your order is cooking",
    "accentColorHex": "#0A84FF",
    "backgroundColorHex": "#0080BA",
    "headerIconUrl": "https://acme.example/logo.png",
    "estimatedMinutes": 30,
    "progressStyle": "segmented",
    "segments": [
      {
        "label": "Cooking",
        "complete": false
      },
      {
        "label": "On the way",
        "complete": false
      },
      {
        "label": "Delivered",
        "complete": false
      }
    ]
  }
}'

Picture

The photo goes in backgroundImageUrl. headerIconUrl is the small logo.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
curl -X POST https://api.webliveactivity.com/api/start \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: wla_your_key' \
  -d '{
  "widgetContainerId": "pet-matches",
  "brand": {
    "title": "Meet Luna"
  },
  "state": {
    "layout": "picture",
    "primaryText": "Luna",
    "secondaryText": "2 year old Tabby, Spayed",
    "accentColorHex": "#FF6B35",
    "headerIconUrl": "https://petfinder.example/logo.png",
    "backgroundImageUrl": "https://petfinder.example/luna.jpg",
    "actionLabel": "View Live",
    "actionURL": "https://petfinder.example/luna"
  }
}'

Versus

Two sides with scores, logos, statuses, and a center column.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
curl -X POST https://api.webliveactivity.com/api/start \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: wla_your_key' \
  -d '{
  "widgetContainerId": "csgo-scores",
  "brand": {
    "title": "CSGO Esports"
  },
  "state": {
    "layout": "versus",
    "primaryText": "Heroic leads 12-9",
    "secondaryText": "Map: Overpass",
    "accentColorHex": "#0A84FF",
    "backgroundColorHex": "#001226",
    "backgroundGradientHex": "#00428C",
    "actionLabel": "Watch Live",
    "actionURL": "https://hltv.org/matches",
    "versus": {
      "leftName": "Movistar",
      "rightName": "Heroic",
      "leftScore": "9",
      "rightScore": "12",
      "leftStatus": "T side",
      "rightStatus": "CT side",
      "activeSide": "right",
      "leftImageUrl": "https://hltv.org/movistar.png",
      "rightImageUrl": "https://hltv.org/heroic.png",
      "centerLabel": "Map",
      "centerValue": "Overpass",
      "sourceLogoUrl": "https://hltv.org/csgo.png"
    }
  }
}'

Countdown

If the card is still on the phone when the time is reached, the service sends one alert by itself. Set completionText for the words shown in place of the clock and in that alert. Start a countdown longer than 8 hours with keepAlive: true, or iOS ends the card before the time is reached.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
curl -X POST https://api.webliveactivity.com/api/start \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: wla_your_key' \
  -d '{
  "widgetContainerId": "gta6-countdown",
  "keepAlive": true,
  "brand": {
    "title": "GTA VI"
  },
  "state": {
    "layout": "countdown",
    "primaryText": "Grand Theft Auto VI",
    "secondaryText": "GTA VI",
    "countdownTo": 1795046400,
    "countdownStyle": "days",
    "completionText": "Out now",
    "headerIconUrl": "https://rockstargames.com/gta6-logo.png"
  }
}'

Ready To Start Building Live Activities Without “Building Them”?

Ready To Start Building Today?

No App Store submission, no native codebase to maintain. A link gets your activity onto your users’ screens, and an easy to use API keeps it live.

Includes: 7,000 Free Pushes per Month

Movistar RidersMovistar RidersTerrorist9
MapOverpass
12HeroicHeroicCounter TerroristCSGOCSGO EsportsWatch Live
8 PM
Doing LaundryComplete This Task By 8:00 PM
Do LaundryClean FloorEat Lunch
Domino'sCooking
912
Movistar RidersMovistar RidersTerrorist9
MapOverpass
12HeroicHeroicCounter TerroristCSGOCSGO EsportsWatch Live
Live
View LiveMoly’s Cat CamUpdated 3 Seconds AgoCat cam
In The Oven NowMat has your order in the oven.Domino's
CookingOn The WayDelivered
Thinking
Researching API EndpointPreparing changes to Foodscout
ThinkingWorkingComplete
Delivery in 30 MinutesMat is racing your way.Domino's
On The WayDelivered
GTA00:00
GTA00:00:00GTA VI
San Francisco ShockHome1
MapMidtown
3
Dallas FuelAwayOverwatch LeagueWatch Live
United 1423Gate B22 · Seat 14C · SFO → JFK
BoardingIn AirArrived
Boarding
Arriving in 6 MinutesMarcus · Toyota CamryToyota Camry
On The WayArrived
6 Min
Movistar RidersMovistar RidersTerrorist9
MapOverpass
12HeroicHeroicCounter TerroristCSGOCSGO EsportsWatch Live
8 PM
Doing LaundryComplete This Task By 8:00 PM
Do LaundryClean FloorEat Lunch
Domino'sCooking
912
Movistar RidersMovistar RidersTerrorist9
MapOverpass
12HeroicHeroicCounter TerroristCSGOCSGO EsportsWatch Live
Live
View LiveMoly’s Cat CamUpdated 3 Seconds AgoCat cam
In The Oven NowMat has your order in the oven.Domino's
CookingOn The WayDelivered
Thinking
Researching API EndpointPreparing changes to Foodscout
ThinkingWorkingComplete
Delivery in 30 MinutesMat is racing your way.Domino's
On The WayDelivered
GTA00:00
GTA00:00:00GTA VI
San Francisco ShockHome1
MapMidtown
3
Dallas FuelAwayOverwatch LeagueWatch Live
United 1423Gate B22 · Seat 14C · SFO → JFK
BoardingIn AirArrived
Boarding
Arriving in 6 MinutesMarcus · Toyota CamryToyota Camry
On The WayArrived
6 Min
Movistar RidersMovistar RidersTerrorist9
MapOverpass
12HeroicHeroicCounter TerroristCSGOCSGO EsportsWatch Live
8 PM
Doing LaundryComplete This Task By 8:00 PM
Do LaundryClean FloorEat Lunch
Domino'sCooking
912
Movistar RidersMovistar RidersTerrorist9
MapOverpass
12HeroicHeroicCounter TerroristCSGOCSGO EsportsWatch Live
Live
View LiveMoly’s Cat CamUpdated 3 Seconds AgoCat cam
In The Oven NowMat has your order in the oven.Domino's
CookingOn The WayDelivered
Thinking
Researching API EndpointPreparing changes to Foodscout
ThinkingWorkingComplete
Delivery in 30 MinutesMat is racing your way.Domino's
On The WayDelivered
GTA00:00
GTA00:00:00GTA VI
San Francisco ShockHome1
MapMidtown
3
Dallas FuelAwayOverwatch LeagueWatch Live
United 1423Gate B22 · Seat 14C · SFO → JFK
BoardingIn AirArrived
Boarding
Arriving in 6 MinutesMarcus · Toyota CamryToyota Camry
On The WayArrived
6 Min