Manage Scheduled Notifications
Goal
List scheduled notifications and cancel one (by id) or cancel all.
Actions used
NotificationServicesGetScheduledNotificationsNotificationServicesGetScheduledNotificationsSuccessResult(optional)NotificationServicesGetScheduledNotificationsError(optional)NotificationServicesCancelNotificationServicesCancelAll
Variables
notificationCount(Int)notificationIds(Array)notificationTitles(Array)notificationBodies(Array)selectedId(String)
Flow
State:
GetScheduledAction:
NotificationServicesGetScheduledNotificationsEvents:
successEventβReadScheduledfailureEventβReadScheduledError
State:
ReadScheduled(choose one approach)Option A: use outputs already populated by
NotificationServicesGetScheduledNotifications(notificationCount,notificationIds, β¦)Option B: Action:
NotificationServicesGetScheduledNotificationsSuccessResult(reads the same data from cache)
Show your list UI using
notificationTitles[i]/notificationBodies[i]. When user selects one item, setselectedId.State:
CancelOneAction:
NotificationServicesCancel(input:notificationId = selectedId)This action has no success/failure events; refresh by calling
GetScheduledagain.
State:
CancelAllAction:
NotificationServicesCancelAllRefresh by calling
GetScheduledagain.
State:
ReadScheduledError(optional)Option A: use
errorCode/errorDescriptionoutputs fromNotificationServicesGetScheduledNotificationsOption B: Action:
NotificationServicesGetScheduledNotificationsError
Notes
On iOS, cancelled notifications disappear from the schedule list; always re-query after cancel operations.
Last updated
Was this helpful?