Packageru.kavolorn.ane
Classpublic class Notifications
InheritanceNotifications Inheritance flash.events.EventDispatcher

Main library class for Notifications native extension.

See also

PRO Native Extensions license server


Public Methods
 MethodDefined By
  
Constructs an extension.
Notifications
  
[static] Gets the main instance to interact with.
Notifications
  
initialize(senderId:String, licenseKey:String):void
Initializes extension.
Notifications
  
isSupported():Boolean
Reports if current platform is supported.
Notifications
  
setDebug(debug:Boolean = false):void
[static] Enables or disables debug output.
Notifications
Events
 Event Summary Defined By
   Dispatched if initialization failed.Notifications
   Dispatched after successful initialization.Notifications
   Dispathced if device is not registered correctly.Notifications
   Dispathced after registration process.Notifications
Constructor Detail
Notifications()Constructor
public function Notifications()

Constructs an extension. Don't use it directly but use getInstance() instead.

Method Detail
getInstance()method
public static function getInstance():Notifications

Gets the main instance to interact with. Don't use constructor.

Returns
Notifications — extension instance.
initialize()method 
public function initialize(senderId:String, licenseKey:String):void

Initializes extension. Should be called before extension can be used.

Parameters

senderId:String — is a project number you acquire from the Google API console.
 
licenseKey:String — key obtained from license server.

isSupported()method 
public function isSupported():Boolean

Reports if current platform is supported.

Returns
Boolean — is platform supported or not.
setDebug()method 
public static function setDebug(debug:Boolean = false):void

Enables or disables debug output.

Parameters

debug:Boolean (default = false) — flag which enables debug output.

Event Detail
initializationError Event
Event Object Type: ru.kavolorn.ane.NotificationsEvent
NotificationsEvent.type property = ru.kavolorn.ane.NotificationsEvent.INITIALIZATION_ERROR

Dispatched if initialization failed.
initializationSuccess Event  
Event Object Type: ru.kavolorn.ane.NotificationsEvent
NotificationsEvent.type property = ru.kavolorn.ane.NotificationsEvent.INITIALIZATION_SUCCESS

Dispatched after successful initialization.
registrationError Event  
Event Object Type: ru.kavolorn.ane.NotificationsEvent
NotificationsEvent.type property = ru.kavolorn.ane.NotificationsEvent.REGISTRATION_ERROR

Dispathced if device is not registered correctly.
registrationIdReceived Event  
Event Object Type: ru.kavolorn.ane.NotificationsEvent
NotificationsEvent.type property = ru.kavolorn.ane.NotificationsEvent.REGISTRATION_ID_RECEIVED

Dispathced after registration process.