Packagecom.distriqt.extension.notifications.events
Classpublic class NotificationEvent
InheritanceNotificationEvent Inheritance flash.events.Event

This is the Notifications Event that gets fired when something happens



Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined 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
Public Constants
 ConstantDefined 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
Property Detail
applicationStateproperty
public var applicationState:String

The state of the application when the notification was received. Will be one of:

idproperty 
public var id:int

The id of the notification that caused this event

identifierproperty 
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

payloadproperty 
public var payload:String

The payload of the notification. This is the payload you attached to the notification.

startupproperty 
public var startup:Boolean

If true this notification was clicked to start the application

timestampproperty 
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

Constructor Detail
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

Parameters
type: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)
Method Detail
clone()method
override public function clone():Event

Returns
Event
Constant Detail
ACTIONConstant
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.

ERRORConstant 
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.

NOTIFICATIONConstant 
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_DELETEDConstant 
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_SELECTEDConstant 
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.