Version: Smart Feature Phone 3.0

BluetoothGatt.disconnect

Description#

The method disconnects an established connection. This is an asynchronous method and its result is returned via a Promise. Once the method is called, property connectionState becomes disconnecting and a corresponding onconnectionstatechanged would be triggered. If the connect operation succeeds, another onconnectionstatechanged would be triggered before the Promise is resolved to indicate property connectionState becomes disconnected.

Syntax#

var promise = instanceOfBluetoothGatt.disconnect();

Return value#

A Promise to indicate whether the operation is resolved or rejected. If the property connectionState is not connected when the method is called, the Promise would be rejected.