on Connection State Change
Called when the connection state changes (connected or disconnected).
This callback is invoked when a connection attempt completes (either successfully or with an error) or when an existing connection is terminated.
Parameters
gatt
The BluetoothGatt instance for the connection.
status
The status of the operation. BluetoothGatt.GATT_SUCCESS indicates the operation completed successfully. Other values indicate errors.
new State
The new connection state: - android.bluetooth.BluetoothProfile.STATE_CONNECTED - android.bluetooth.BluetoothProfile.STATE_DISCONNECTED
See also
Connection State Machine. handle Connection State Change