Detecting the same problem when calling the disconnect () method. On my BluetoothGattCallback connection, the connection in onConnectionStateChange does not disconnect.
Bluetooth cycling seems to be the only thing that works.
edit: also, after calling the disconnect () and close () methods, I am still connected according to this code:
public int getConnectedBLEDevices() { int i = 0; List<BluetoothDevice> devices = mBluetoothManager.getConnectedDevices(BluetoothProfile.GATT); for(BluetoothDevice device : devices) { if(device.getType() == BluetoothDevice.DEVICE_TYPE_LE) { Logs.writeEvent(TAG+".getConnectedBLEDevices()", device.getAddress() + "\n"+ getStateAsString(mBluetoothManager.getConnectionState(device, BluetoothProfile.GATT))); i++; } } return i; }
source share