Difference between revisions of "Notification.new"
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>Creates new notification object with provided id. Scheduled notifications can later be canceled or modified using provided ID. | <translate>Creates new notification object with provided id. Scheduled notifications can later be canceled or modified using provided ID. | ||
Revision as of 07:29, 24 August 2018
Available since: Gideros 2011.6
Description
Creates new notification object with provided id. Scheduled notifications can later be canceled or modified using provided ID.
Here are couple of scenarios that may happen, when creating notifications:
Notification with provided ID does not exist yet, so you simply create new scheduled notification. Next if you create another notification with same ID, while the first one is till scheduled, you will simply modify the existing scheduled notification with new title, message, etc and can even change it's scheduled time by redispatching it. If you create notification with same ID, while the first notification was already displayed, you will simply create a new notification.
So as you see, you may use notification ID's as types of notifications. For example, if you have a energy bar that will be restored after some time, you could always dispatch this notification with same ID.
However, if you want to display for example, that there are new chat messages from different users, they should have different IDs.
Notification.new()