In Bluetooth Low Energy (BLE), the connection status: connect and disconnect is performed in the function
@Override
public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) {}
For example, when I connect the BLE with the phone, the above function is called and return the connection state. But I found one issue that is disconnection state. When the phone and BLE are connected, I will turn off the BLE, the above function is not called at that time. I must wait about 5-6 seconds to known the disconnection state. I think it is from scanning time. Is it possible to reduce the delay time. It means I want to know the disconnection state as soon as the BLE and phone are disconnected. Thank all