Package | com.distriqt.extension.notifications.events |
Class | public class NotificationEvent |
Inheritance | NotificationEvent ![]() |
Property | Defined By | ||
---|---|---|---|
applicationState : String
The state of the application when the notification was received. | NotificationEvent | ||
id : int
The id of the notification that caused this event
| NotificationEvent | ||
identifier : String
The identifier of the action that was selected by the user
May be null if there is no action associated with this event
| NotificationEvent | ||
payload : String
The payload of the notification. | NotificationEvent | ||
startup : Boolean
If true this notification was clicked to start the application
| NotificationEvent | ||
timestamp : Number = -1
The timestamp at which the event occurred. | NotificationEvent |
Method | Defined By | ||
---|---|---|---|
NotificationEvent(type:String, id:int, payload:String, applicationState:String, startup:Boolean, identifier:String = null, timestamp:Number = -1, bubbles:Boolean = false, cancelable:Boolean = false)
Constructor
| NotificationEvent | ||
clone():Event [override] | NotificationEvent |
Constant | Defined By | ||
---|---|---|---|
ACTION : String = notification:action [static]
Dispatched when a user selects an action on a notification. | NotificationEvent | ||
ERROR : String = notification:error [static]
Dispatched when an error occurred, either an invalid format notification payload
or a connection issue. | NotificationEvent | ||
NOTIFICATION : String = notification:notification [static]
A Notification was received
The payload field will contain a json formatted string containing the
payload sent with this notification. | NotificationEvent | ||
NOTIFICATION_DELETED : String = notification:notification:deleted [static]
This event is dispatched when the user dismisses a notification. | NotificationEvent | ||
NOTIFICATION_SELECTED : String = notification:notification:selected [static]
This event is dispatched when the user clicks on a notification
in the notification manager. | NotificationEvent |
applicationState | property |
public var applicationState:String
The state of the application when the notification was received. Will be one of:
id | property |
public var id:int
The id of the notification that caused this event
identifier | property |
public var identifier:String
The identifier of the action that was selected by the user
May be null
if there is no action associated with this event
payload | property |
public var payload:String
The payload of the notification. This is the payload you attached to the notification.
startup | property |
public var startup:Boolean
If true
this notification was clicked to start the application
timestamp | property |
public var timestamp:Number = -1
The timestamp at which the event occurred. This is only valid for Android where notifications have been triggered when the application was inactive and delay dispatched at startup
NotificationEvent | () | Constructor |
public function NotificationEvent(type:String, id:int, payload:String, applicationState:String, startup:Boolean, identifier:String = null, timestamp:Number = -1, bubbles:Boolean = false, cancelable:Boolean = false)
Constructor
Parameterstype:String | |
id:int | |
payload:String | |
applicationState:String | |
startup:Boolean | |
identifier:String (default = null )
| |
timestamp:Number (default = -1 )
| |
bubbles:Boolean (default = false )
| |
cancelable:Boolean (default = false )
|
clone | () | method |
override public function clone():Event
ReturnsEvent |
ACTION | Constant |
public static const ACTION:String = notification:action
Dispatched when a user selects an action on a notification.
The identifier
will contain the identifier of the action
allowing you to determine what action to take.
ERROR | Constant |
public static const ERROR:String = notification:error
Dispatched when an error occurred, either an invalid format notification payload
or a connection issue.
The payload
will contain the details of the error.
NOTIFICATION | Constant |
public static const NOTIFICATION:String = notification:notification
A Notification was received The payload field will contain a json formatted string containing the payload sent with this notification.
NOTIFICATION_DELETED | Constant |
public static const NOTIFICATION_DELETED:String = notification:notification:deleted
This event is dispatched when the user dismisses a notification. This may have been when the application was running in the background or wasn't running at all. If the application wasn't running this event will be dispatched straight after a call to register. Only available on Android
NOTIFICATION_SELECTED | Constant |
public static const NOTIFICATION_SELECTED:String = notification:notification:selected
This event is dispatched when the user clicks on a notification in the notification manager. This may have been when the application was running in the background or wasn't running at all. If the application wasn't running this event will be dispatched straight after a call to register.