Packagecom.distriqt.extension.application.alarms
Interfacepublic interface AlarmManager extends flash.events.IEventDispatcher

This class provides access to the system alarm services. These allow you to schedule your application to be run at some point in the future. When an alarm goes off, an event will be dispatched containing the details of the alarm. Registered alarms are retained while the device is asleep (and can optionally wake the device up if they go off during that time), but will be cleared if it is turned off and rebooted.



Public Properties
 PropertyDefined By
  isSupported : Boolean
[read-only] If true the alarm manager functionality is available on this device.
AlarmManager
Public Methods
 MethodDefined By
  
cancelAlarm(alarm:Alarm):Boolean
Cancels a previously set alarm
AlarmManager
  
cancelAlarmById(id:int):Boolean
Cancels a previously set alarm
AlarmManager
  
cancelAllAlarms():Boolean
Cancels all previously set alarms
AlarmManager
  
register():Boolean
This will register your application to receive alarms and as part of this process any alarms that were received while your application wasn't running or received at startup will be dispatched.
AlarmManager
  
setAlarm(alarm:Alarm):Boolean
Sets the specified alarm
AlarmManager
Events
 Event Summary Defined By
  AlarmManager
  AlarmManager
Property Detail
isSupportedproperty
isSupported:Boolean  [read-only]

If true the alarm manager functionality is available on this device.

Generally this will return true on Android and false on other platforms.


Implementation
    public function get isSupported():Boolean
Method Detail
cancelAlarm()method
public function cancelAlarm(alarm:Alarm):Boolean

Cancels a previously set alarm

Parameters

alarm:Alarm — The alarm to clear

Returns
Booleantrue if the alarm was cleared and false if the alarm could not be found
cancelAlarmById()method 
public function cancelAlarmById(id:int):Boolean

Cancels a previously set alarm

Parameters

id:int — The id of the alarm to clear

Returns
Booleantrue if the alarm was cleared and false if the alarm could not be found
cancelAllAlarms()method 
public function cancelAllAlarms():Boolean

Cancels all previously set alarms

Returns
Booleantrue if successful
register()method 
public function register():Boolean

This will register your application to receive alarms and as part of this process any alarms that were received while your application wasn't running or received at startup will be dispatched. You should ensure you have added any relevant event listeners before calling register.

Returns
Booleantrue if successful and false otherwise
setAlarm()method 
public function setAlarm(alarm:Alarm):Boolean

Sets the specified alarm

Parameters

alarm:Alarm — Instance of the Alarm class preferably built with an AlarmBuilder.

Returns
Booleantrue if the alarm was set successfully
Event Detail
alarm Event
Event Object Type: com.distriqt.extension.application.events.AlarmEvent
AlarmEvent.type property = com.distriqt.extension.applications.events.AlarmEvent.ALARM

alarm_error Event  
Event Object Type: com.distriqt.extension.application.events.AlarmEvent
AlarmEvent.type property = com.distriqt.extension.applications.events.AlarmEvent.ERROR