Changes

Jump to: navigation, search

B2G/Bluetooth/WebBluetooth-v2/BluetoothGatt

178 bytes removed, 08:23, 27 January 2015
remove auto connect
; Return
: A Promise to indicate whether the operation is resolved or rejected. The Promise would be rejected if 1) property [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGatt#connectionState|connectionState]] is not <tt>disconnected</tt> when the method is called, or 2) autoConnect is false and the remote LE device is not in range, or 3) [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGatt#disconnect.28.29|BluetoothGatt.disconnect()]] is issued and succeeded before the connect process is done.
; Sample
if (gatt) {
gatt.connect(false).then ( function onResolve() {
console.log("Re-connection succeedsConnection established. ConnectionState becomes:", gatt.connectionState);
}, function onReject(aReason) {
console.log("Rejected with this reason: ", aReason, ". ConnectionState becomes:", gatt.connectionState);
; Note
: Auto connection establishment procedure defined in bluetooth specification(3.C.9.3.5) is not support supported yet.
: Please see [https://bugzilla.mozilla.org/show_bug.cgi?id=1126123 Bug 1126123] for details.
120
edits

Navigation menu