Skip to content

Commit 4db5342

Browse files
committed
chore: deprecate exitLiveActivity API and remove demo UI
1 parent ded4677 commit 4db5342

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

examples/demo/lib/widgets/sections/live_activities_section.dart

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,6 @@ class _LiveActivitiesSectionState extends State<LiveActivitiesSection> {
8282
: () => vm.updateLiveActivity(),
8383
),
8484
AppSpacing.gapBox,
85-
SizedBox(
86-
width: double.infinity,
87-
child: OutlinedButton(
88-
onPressed: activityEmpty ? null : () => vm.exitLiveActivity(),
89-
style: OutlinedButton.styleFrom(
90-
foregroundColor: AppColors.osPrimary,
91-
side: const BorderSide(color: AppColors.osPrimary),
92-
),
93-
child: const Text('STOP UPDATING LIVE ACTIVITY'),
94-
),
95-
),
96-
AppSpacing.gapBox,
9785
SizedBox(
9886
width: double.infinity,
9987
child: OutlinedButton(

lib/src/liveactivities.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class OneSignalLiveActivities {
55
// private channels used to bridge to ObjC/Java
66
MethodChannel _channel = const MethodChannel('OneSignal#liveactivities');
77

8-
/// Indicate this device has exited a live activity, identified within OneSignal by the [activityId]. The
8+
/// Indicate this device has entered a live activity, identified within OneSignal by the [activityId]. The
99
/// [token] is the ActivityKit's update token that will be used to update the live activity.
1010
///
1111
/// Only applies to iOS.
@@ -19,6 +19,7 @@ class OneSignalLiveActivities {
1919
/// Indicate this device has exited a live activity, identified within OneSignal by the [activityId].
2020
///
2121
/// Only applies to iOS.
22+
@Deprecated('This API is no longer supported and will be removed in a future release.')
2223
Future<void> exitLiveActivity(String activityId) async {
2324
if (defaultTargetPlatform == TargetPlatform.iOS) {
2425
return await _channel.invokeMethod(

0 commit comments

Comments
 (0)