Changes

Jump to: navigation, search

B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter

3 bytes added, 06:58, 22 August 2014
enable()
; Description
: The method turns on the local bluetooth adapter.
: This is an asynchronous method and its result is returned via a Promise. Once the method is called, property [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#state|adapter.state]] becomes <tt>enabling</tt> and a corresponding [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#onattributechanged|onattributechanged]] would be triggered. If the enable operation succeeds, several [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#onattributechanged|onattributechanged]] would be triggered before the Promise is resolved to indicate the address and name has been updated, and the last one must indicate property [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#state|adapter.state]] becomes <tt>enabled</tt>. In other words, all adapter's properties except [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#pairingReqs|adapter.pairingReqs]] and event handlers must be updated value once property [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#state|adapter.state]] becomes <tt>enabled</tt>.
; Return
Confirm
891
edits

Navigation menu