Difference between revisions of "NotificationManager:cancelNotification"

From GiderosMobile
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Available since:''' Gideros 2011.6<br/>
+
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
=== Description ===
+
=== <translate>Description</translate> ===
 
<translate>Cancel specific scheduled notification by it's ID.
 
<translate>Cancel specific scheduled notification by it's ID.
  
Line 8: Line 8:
 
  NotificationManager:cancelNotification()
 
  NotificationManager:cancelNotification()
 
</source>
 
</source>
=== Examples ===
+
=== <translate>Examples</translate> ===
 
'''Cancel notification'''<br/>
 
'''Cancel notification'''<br/>
 
<source lang="lua">--id of notification to cancel
 
<source lang="lua">--id of notification to cancel

Revision as of 08:28, 24 August 2018

Available since: Gideros 2011.6

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)