BluetoothStatusChangedEvent
Tags:
2.5
Description
The BluetoothStatusChangedEvent API provides access to information regarding any change to the status of a Bluetooth device.
A status change occurs when one of the following events is triggered:
- a2dpstatuschange : It occurs when an A2DP connection status changes. See BluetoothAdapter.ona2dpstatuschanged for more information.
- hfpstatuschange : It occurs when an HFP connection status changes. See BluetoothAdapter.onhfpstatuschanged for more information.
- scostatuschange : It occurs when an SCO connection status changes. See BluetoothAdapter.onscostatuschanged for more information.
Interface overview
[CheckAnyPermissions="bluetooth"]
interface BluetoothStatusChangedEvent : Event
{
readonly attribute DOMString address;
readonly attribute boolean status;
};
Properties
-
BluetoothStatusChangedEvent.address
A string representing the address of the device for which the status has changed in the Bluetooth micro-network. BluetoothStatusChangedEvent.status
A boolean representing the current status of the connection. It can be enabled (true) or disabled (false).