Hi,
In my app i am allowing user to schedule local notification. The user also has the ability to modify the notification at a later stage. When the user modifies the notification, i need to:
- Cancel old notification
- Schedule the new notification.
I am struggling to implement cancel notification feature. As per API, i can use
system.cancelNotification(notificationID)
I just learned that notificationID is of the type: userdata, which is kind of a pointer to C/C++ object
At the first place, when the user schedules a new notification, i do get a handle to userdata notification id using the following code
local notificationId = system.scheduleNotification()
My struggle is how to persist this userData object. Because, the user could come back after 2 days to modify a scheduled notification. I need to persist the old notification id(userdata objects) to cancel them using system.cancelNotification
Has anyone encountered this or has any suggestion how to handle this.
The only other option is to cancel all notification and then reschedule them again…But then what is the use of the parameter notification in the cancelNotification function.
Any help is appreciated.
thx,
Bejoy
[import]uid: 84539 topic_id: 19833 reply_id: 319833[/import]