Packageflash.notifications
Classpublic class RemoteNotifier
InheritanceRemoteNotifier Inheritance EventDispatcher Inheritance Object

Language version: ActionScript 3.0
Runtime version: AIR 3.4

The RemoteNotifier class lets you subscribe to and unsubscribe from push notifications.

This class includes methods to query which RemoteNotificationStyles are supported on the target platform. It dispatches RemoteNotificationEvent and StatusEvent.

See also

flash.notifications.NotificationStyle
flash.events.RemoteNotificationEvent
flash.events.StatusEvent


Public Properties
 PropertyDefined by
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
  supportedNotificationStyles : Vector.<String>
[static][read-only] A vector list of all supported notification styles.
RemoteNotifier
Public Methods
 MethodDefined by
  
Creates a new RemoteNotifier object.
RemoteNotifier
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
EventDispatcher
 Inherited
Dispatches an event into the event flow.
EventDispatcher
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
EventDispatcher
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
EventDispatcher
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
  
Subscribes/registers the application to receive remote notifications from APNs.
RemoteNotifier
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
  
Unsubscribes the application from receiving remote notifications via APNs.
RemoteNotifier
 Inherited
Returns the primitive value of the specified object.
Object
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
EventDispatcher
Events
 EventSummaryDefined by
 Inherited [broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active.EventDispatcher
 Inherited [broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive.EventDispatcher
   Dispatched in response to a new notification received by the application.RemoteNotifier
   Dispatched if an error is encountered during the subscription process.RemoteNotifier
   Dispatched when a notification token is available from the iOS upon successful subscription for remote notifications.RemoteNotifier
Property detail
supportedNotificationStylesproperty
supportedNotificationStyles:Vector.<String>  [read-only]

Language version: ActionScript 3.0
Runtime version: AIR 3.4

A vector list of all supported notification styles.

Implementation
    public static function get supportedNotificationStyles():Vector.<String>

See also

Constructor detail
RemoteNotifier()constructor
public function RemoteNotifier()

Language version: ActionScript 3.0
Runtime version: AIR 3.4

Creates a new RemoteNotifier object.

Method detail
subscribe()method
public function subscribe(options:RemoteNotifierSubscribeOptions = null):void

Language version: ActionScript 3.0
Runtime version: AIR 3.4

Subscribes/registers the application to receive remote notifications from APNs.

Parameters
options:RemoteNotifierSubscribeOptions (default = null) — options required for the subscription process on some platforms.
unsubscribe()method 
public function unsubscribe():void

Language version: ActionScript 3.0
Runtime version: AIR 3.4

Unsubscribes the application from receiving remote notifications via APNs.

Event detail
notificationevent 
Event object type: flash.events.RemoteNotificationEvent

Language version: ActionScript 3.0
Runtime version: AIR 3.4

Dispatched in response to a new notification received by the application.

For iOS, this event is fired in the following scenarios:

statusevent  
Event object type: flash.events.StatusEvent

Language version: ActionScript 3.0
Runtime version: AIR 3.4

Dispatched if an error is encountered during the subscription process.

tokenevent  
Event object type: flash.events.RemoteNotificationEvent

Language version: ActionScript 3.0
Runtime version: AIR 3.4

Dispatched when a notification token is available from the iOS upon successful subscription for remote notifications.