Difference between revisions of "Notification"

From GiderosMobile
(Created page with "__NOTOC__ '''Supported platforms:''' <br/> '''Available since:''' Gideros 2011.6<br/> === Description === Notification class is used to compose and schedule new local notifica...")
 
Line 5: Line 5:
 
Notification class is used to compose and schedule new local notifications. You need to provide an ID of notification to constructor. Using same provided ID you can create a new instance of Notification class and modify existing notification with that ID. Additionally the ID allows you to identify local notification in the table of scheduled local notifications retrieved from `NotificationManager:getScheduledNotifications`, or table of local notifications that were already displayed using `NotificationManager:getLocalNotifications`
 
Notification class is used to compose and schedule new local notifications. You need to provide an ID of notification to constructor. Using same provided ID you can create a new instance of Notification class and modify existing notification with that ID. Additionally the ID allows you to identify local notification in the table of scheduled local notifications retrieved from `NotificationManager:getScheduledNotifications`, or table of local notifications that were already displayed using `NotificationManager:getLocalNotifications`
  
`Notification` consists of notification message, title, sound and number. Only message is the mandatory one. You can combine others as you wish.{|-
+
`Notification` consists of notification message, title, sound and number. Only message is the mandatory one. You can combine others as you wish.
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
{|-
 
| style="width: 50%;"|
 
| style="width: 50%;"|
 
=== Methods ===
 
=== Methods ===
 +
[[Notification.new]] - creates new notification<br/>
 +
[[Notification:cancel]] - cancel notification<br/>
 +
[[Notification:dispatchAfter]] - Dispatch notification after specified time<br/>
 +
[[Notification:dispatchNow]] - dispatch notification now<br/>
 +
[[Notification:dispatchOn]] - dispatch on specified date<br/>
 +
[[Notification:getId]] - get id of notification<br/>
 +
[[Notification:getMessage]] - get message of notification<br/>
 +
[[Notification:getNumber]] - get notification number<br/>
 +
[[Notification:getSound]] - get sound of notification<br/>
 +
[[Notification:getTitle]] - get title of notification<br/>
 +
[[Notification:setNumber]] - set notification number<br/>
 +
[[Notification:setSound]] - set notification sound<br/>
 +
[[Notification:setTitle]] - set the title of notification<br/>
 
| style="width: 50%;"|
 
| style="width: 50%;"|
 
=== Events ===
 
=== Events ===
 
=== Constants ===
 
=== Constants ===
 +
[[Notification.DEFAULT_SOUND]]
 
|}
 
|}

Revision as of 09:57, 23 August 2018

Supported platforms:
Available since: Gideros 2011.6

Description

Notification class is used to compose and schedule new local notifications. You need to provide an ID of notification to constructor. Using same provided ID you can create a new instance of Notification class and modify existing notification with that ID. Additionally the ID allows you to identify local notification in the table of scheduled local notifications retrieved from `NotificationManager:getScheduledNotifications`, or table of local notifications that were already displayed using `NotificationManager:getLocalNotifications`

`Notification` consists of notification message, title, sound and number. Only message is the mandatory one. You can combine others as you wish.










Methods

Notification.new - creates new notification
Notification:cancel - cancel notification
Notification:dispatchAfter - Dispatch notification after specified time
Notification:dispatchNow - dispatch notification now
Notification:dispatchOn - dispatch on specified date
Notification:getId - get id of notification
Notification:getMessage - get message of notification
Notification:getNumber - get notification number
Notification:getSound - get sound of notification
Notification:getTitle - get title of notification
Notification:setNumber - set notification number
Notification:setSound - set notification sound
Notification:setTitle - set the title of notification

Events

Constants

Notification.DEFAULT_SOUND