Package | flash.notifications |
Class | public class RemoteNotifier |
Inheritance | RemoteNotifier EventDispatcher Object |
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 3.4 |
This class includes methods to query which RemoteNotificationStyles are supported on the target platform. It dispatches RemoteNotificationEvent and StatusEvent.
Related API Elements
Property | Defined By | ||
---|---|---|---|
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
supportedNotificationStyles : Vector.<String> [static] [read-only]
A vector list of all supported notification styles. | RemoteNotifier |
Method | Defined By | ||
---|---|---|---|
Creates a new RemoteNotifier object. | RemoteNotifier | ||
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 | ||
Dispatches an event into the event flow. | EventDispatcher | ||
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | EventDispatcher | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Removes a listener from the EventDispatcher object. | EventDispatcher | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Subscribes/registers the application to receive remote notifications from APNs. | RemoteNotifier | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Unsubscribes the application from receiving remote notifications via APNs. | RemoteNotifier | ||
Returns the primitive value of the specified object. | Object | ||
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type. | EventDispatcher |
Event | Summary | Defined By | ||
---|---|---|---|---|
[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher | |||
[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 |
supportedNotificationStyles | property |
RemoteNotifier | () | Constructor |
public function RemoteNotifier()
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 3.4 |
Creates a new RemoteNotifier object.
subscribe | () | method |
public function subscribe(options:RemoteNotifierSubscribeOptions = null):void
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 3.4 |
Subscribes/registers the application to receive remote notifications from APNs.
- RemoteNotificationEvent (TOKEN) is fired once the token is available. This token is to be used by remote notification providers to send remote notifications to this application on the device via APNs.
- RemoteNotificationEvent (NOTIFICATION) is fired when platform OS communicates the notification to the application.
- StatusEvent (STATUS) is fired when an error occurs while subscribing for remote notifications.
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 Versions: | AIR 3.4 |
Unsubscribes the application from receiving remote notifications via APNs.
notification | Event |
flash.events.RemoteNotificationEvent
property RemoteNotificationEvent.type =
flash.events.RemoteNotificationEvent
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 3.4 |
Dispatched in response to a new notification received by the application.
For iOS, this event is fired in the following scenarios:
- The application was in the foreground when a new notification was received.
- As display of a notification popup, the user taps the action button of the alert or taps (or clicks) the application icon. In this case, no information about the notification payload is available.
status | Event |
flash.events.StatusEvent
property StatusEvent.type =
flash.events.StatusEvent
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 3.4 |
Dispatched if an error is encountered during the subscription process.
token | Event |
flash.events.RemoteNotificationEvent
property RemoteNotificationEvent.type =
flash.events.RemoteNotificationEvent
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 3.4 |
Dispatched when a notification token is available from the iOS upon successful subscription for remote notifications.
Wed Nov 21 2018, 06:34 AM -08:00