Packagecom.distriqt.extension.bluetoothle.events
Classpublic class PeripheralManagerEvent
InheritancePeripheralManagerEvent Inheritance flash.events.Event



Public Properties
 PropertyDefined By
  data : Service = null
A Service object containing data about this event.
PeripheralManagerEvent
Public Methods
 MethodDefined By
  
PeripheralManagerEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, data:Service = null)
Constructor
PeripheralManagerEvent
  
clone():Event
[override]
PeripheralManagerEvent
Public Constants
 ConstantDefined By
  SERVICE_ADD : String = peripheralManager:service:add
[static] Dispatched when a service is successfully added to the device's database of published services data will contain the Service that this event concerns
PeripheralManagerEvent
  SERVICE_ADD_ERROR : String = peripheralManager:service:add:error
[static] Dispatched when a service fails to be added to the device's database of published services data will contain the Service that this event concerns
PeripheralManagerEvent
  START_ADVERTISING : String = peripheralManager:startAdvertising
[static] Dispatched when the device starts advertising your services after a call to startAdvertising
PeripheralManagerEvent
  STATE_CHANGED : String = peripheralManager:state:changed
[static] Dispatched when the state of the Bluetooth adpater changes.
PeripheralManagerEvent
Property Detail
dataproperty
public var data:Service = null

A Service object containing data about this event. See the individual events for it's usage. This value may be null.

Constructor Detail
PeripheralManagerEvent()Constructor
public function PeripheralManagerEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, data:Service = null)

Constructor

Parameters
type:String
 
bubbles:Boolean (default = false)
 
cancelable:Boolean (default = false)
 
data:Service (default = null)
Method Detail
clone()method
override public function clone():Event

Returns
Event
Constant Detail
SERVICE_ADDConstant
public static const SERVICE_ADD:String = peripheralManager:service:add

Dispatched when a service is successfully added to the device's database of published services

data will contain the Service that this event concerns

SERVICE_ADD_ERRORConstant 
public static const SERVICE_ADD_ERROR:String = peripheralManager:service:add:error

Dispatched when a service fails to be added to the device's database of published services

data will contain the Service that this event concerns

START_ADVERTISINGConstant 
public static const START_ADVERTISING:String = peripheralManager:startAdvertising

Dispatched when the device starts advertising your services after a call to startAdvertising

STATE_CHANGEDConstant 
public static const STATE_CHANGED:String = peripheralManager:state:changed

Dispatched when the state of the Bluetooth adpater changes. For example, the user has turned off Bluetooth on their device.

You should listen for this event and make sure you re-start any services when the adapter is turned on again.