Skip to content

refactor(demo): [SDK-4217] remove stop-updating button and deprecate exit API#1935

Merged
fadi-george merged 3 commits intomainfrom
fg/update-demo
Apr 2, 2026
Merged

refactor(demo): [SDK-4217] remove stop-updating button and deprecate exit API#1935
fadi-george merged 3 commits intomainfrom
fg/update-demo

Conversation

@fadi-george
Copy link
Copy Markdown
Collaborator

Description

One Line Summary

Remove the "Stop Updating Live Activity" button from the demo app and deprecate LiveActivities.exit() in the SDK public API.

Details

Motivation

The exit / exitLiveActivity method unsubscribes a device from future updates for a given activity ID, but ending a Live Activity via the REST API (which the demo already supports) is the recommended approach. Removing the button simplifies the demo UI and aligns with the updated shared build spec.

Scope

  • Demo app: Remove the "STOP UPDATING LIVE ACTIVITY" button and its entire call chain (LiveActivitySectionHomeScreenAppContextOneSignalRepository)
  • SDK: Add @deprecated JSDoc annotations to exitLiveActivity in NativeOneSignal.ts and LiveActivities.exit() in index.ts
  • ActionButton: Remove unused destructive variant (only primary and outlined remain)
  • No behavioral changes to the SDK itself

Testing

Unit testing

All 244 existing tests pass via vp test. No test changes needed — exit tests remain to cover the deprecated-but-still-functional API.

Manual testing

  • Verify the Live Activities section shows only 3 buttons: Start, Update, End
  • Verify LiveActivities.exit() still works but shows as deprecated in IDE

Affected code checklist

  • Notifications
  • 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
  • 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.
  • I have reviewed this PR myself, ensuring it meets each checklist item

Made with Cursor

@fadi-george fadi-george requested a review from a team as a code owner April 1, 2026 22:09
@fadi-george fadi-george merged commit bfdfb3c into main Apr 2, 2026
7 checks passed
@fadi-george fadi-george deleted the fg/update-demo branch April 2, 2026 00:22
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