apidocs / com.nimmsta.core.android.bluetooth / DeviceBluetoothService / lastDisconnectReason

lastDisconnectReason

var lastDisconnectReason: Reason?

Set by disconnectAndClose method in order to override the reason generated by the onConnectionStateChange method, which is normally BluetoothDisconnectedException.Reason.DEVICE_INITIATED, in some cases BluetoothDisconnectedException.Reason.PAIRING_FAILED.