Skip to content

feat(demo): add Live Activity delivery tracker example#1932

Closed
nan-li wants to merge 2 commits intomainfrom
demo_update_live_activity
Closed

feat(demo): add Live Activity delivery tracker example#1932
nan-li wants to merge 2 commits intomainfrom
demo_update_live_activity

Conversation

@nan-li
Copy link
Copy Markdown
Contributor

@nan-li nan-li commented Mar 31, 2026

Description

One Line Summary

Add a delivery order tracking Live Activity using DefaultLiveActivityAttributes with setupDefault + startDefault flow. Includes the iOS widget extension (lock screen, Dynamic Island, progress bar), React Native UI section with delivery-themed inputs, and setupDefault call at app init.

Details

Motivation

Demo L.A.

Scope

Demo app only

Testing

Unit testing

OPTIONAL - Explain unit tests added, if not clear in the code.

Manual testing

Push-to-update example payload (send via OneSignal REST API):

  POST https://api.onesignal.com/apps/{app_id}/live_activities/{activity_id}/notifications
  {
    "event": "update",
    "event_updates": {
      "data": {
        "status": "on_the_way",
        "message": "Driver is heading your way",
        "estimatedTime": "10 min"
      }
    },
    "name": "Delivery Update"
  }

To mark delivered:
"event_updates": {
  "data": {
    "status": "delivered",
    "message": "Order delivered!",
    "estimatedTime": ""
  }
}

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
    • Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
  • I have reviewed this PR myself, ensuring it meets each checklist item
    • WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

Add a delivery order tracking Live Activity using DefaultLiveActivityAttributes
with setupDefault + startDefault flow. Includes the iOS widget extension
(lock screen, Dynamic Island, progress bar), React Native UI section with
delivery-themed inputs, and setupDefault call at app init.

Made-with: Cursor
@nan-li nan-li requested a review from a team as a code owner March 31, 2026 08:15
@nan-li nan-li requested a review from fadi-george March 31, 2026 08:22
…on comment

DefaultLiveActivityAttributes wraps content state in a `data` dictionary,
so event_updates must nest values under `data`.

Made-with: Cursor
@fadi-george
Copy link
Copy Markdown
Collaborator

I'll remake the pr with more features.

@fadi-george fadi-george deleted the demo_update_live_activity branch March 31, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants