NotificationManager:cancelNotification

From GiderosMobile
Revision as of 15:32, 13 July 2023 by Hgy29 (talk | contribs) (Text replacement - "</source>" to "</syntaxhighlight>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Available since: Gideros 2011.6
Class: NotificationManager

Description

Cancel specific scheduled notification by it's ID.

Basically it's the same as creating new notification with same ID and cancelling it:

 NotificationManager:cancelNotification()

Examples

Cancel notification

--id of notification to cancel
local id = 1

--cancel through notification isntance
local notification = Notification.new(id)
notification:cancel()

--cancel through NotificationManager
local mngr = NotificationManager:getSharedInstance()
mngr:cancelNotification(id)