Difference between revisions of "NotificationManager:cancelNotification"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
Line 7: Line 7:
  
 
Basically it's the same as creating new notification with same ID and cancelling it:</translate>
 
Basically it's the same as creating new notification with same ID and cancelling it:</translate>
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
  NotificationManager:cancelNotification()
 
  NotificationManager:cancelNotification()
 
</source>
 
</source>
 
=== <translate>Examples</translate> ===
 
=== <translate>Examples</translate> ===
 
'''Cancel notification'''<br/>
 
'''Cancel notification'''<br/>
<source lang="lua">--id of notification to cancel
+
<syntaxhighlight lang="lua">--id of notification to cancel
 
local id = 1
 
local id = 1
  

Revision as of 14:30, 13 July 2023


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: <syntaxhighlight lang="lua">

NotificationManager:cancelNotification()

</source>

Examples

Cancel notification
<syntaxhighlight lang="lua">--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)</source>