Package | com.distriqt.extension.bluetoothle.events |
Class | public class PeripheralManagerEvent |
Inheritance | PeripheralManagerEvent ![]() |
Property | Defined By | ||
---|---|---|---|
data : Service = null
A Service object containing data about this event. | PeripheralManagerEvent |
Method | Defined By | ||
---|---|---|---|
PeripheralManagerEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, data:Service = null)
Constructor
| PeripheralManagerEvent | ||
clone():Event [override] | PeripheralManagerEvent |
Constant | Defined 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 |
data | property |
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.
PeripheralManagerEvent | () | Constructor |
public function PeripheralManagerEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, data:Service = null)
Constructor
Parameterstype:String | |
bubbles:Boolean (default = false )
| |
cancelable:Boolean (default = false )
| |
data:Service (default = null )
|
clone | () | method |
override public function clone():Event
ReturnsEvent |
SERVICE_ADD | Constant |
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_ERROR | Constant |
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_ADVERTISING | Constant |
public static const START_ADVERTISING:String = peripheralManager:startAdvertising
Dispatched when the device starts advertising your services after a call to startAdvertising
STATE_CHANGED | Constant |
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.