Version: Smart Feature Phone 2.5Version: Smart Feature Phone 2.6
BluetoothManager
Description#
The BluetoothManager interface of the Bluetooth API allows to access all Bluetooth adapters available on the device. Adapters are the connection interface to connect a Bluetooth device to that device.
Interface overview#
Properties#
BluetoothManager.defaultAdapterread-onlyA BluetoothAdapter object selected by default. The value would be null if the device doesn't have any Bluetooth chip.
Event Handlers#
BluetoothManager.onadapteraddedA handler for the adapteradded event; it is triggered when a Bluetooth adapter is added to the device.BluetoothManager.onadapterremovedA handler for the adapterremoved event; it is triggered when a Bluetooth adapter is removed from the device.BluetoothManager.onattributechangedA handler for the attributechanged event; it is triggered when the BluetoothManager.defaultAdapter property changes.
Note: Because the BluetoothManager interface inherits from the EventTarget interface, all these events can be listened by using the addEventListener method.
Methods#
BluetoothManager.getAdapters()Returns a list of the current BluetoothAdapters in use on the device.