writable
Makes this LocalCharacteristic writable by a com.splendo.kaluga.bluetooth.ConnectedDevice Cannot be called if writable or writableAlwaysSuccess has been called before
Parameters
the CharacteristicProperty.Writable of the characteristic. Must not be empty
true if reading from the characteristic should be encrypted. This will result in Permission.WRITE_ENCRYPTION_REQUIRED. Otherwise will add Permission.WRITABLE
the function to call when reading from the characteristic. This contains the com.splendo.kaluga.bluetooth.ConnectedDevice, the ByteArray to write and the offset of the data to write and should return a GattResponse.WriteResponse
Makes this LocalCharacteristic writable by a com.splendo.kaluga.bluetooth.ConnectedDevice Cannot be called if writable or writableAlwaysSuccess has been called before
Parameters
the CharacteristicProperty.Writable of the characteristic. Must not be empty
true if reading from the characteristic should be encrypted. This will result in Permission.WRITE_ENCRYPTION_REQUIRED. Otherwise will add Permission.WRITABLE
the function to call when writing to the characteristic fails. This contains the com.splendo.kaluga.bluetooth.ConnectedDevice and the exception that caused deserialization to fail and should return a GattResponse.WriteResponse
the function to call when reading from the characteristic. This contains the com.splendo.kaluga.bluetooth.ConnectedDevice, and the T to write and should return a GattResponse.WriteResponse. If the data being written is split over multiple offsets, this will only be called when the data can be fully deserialized
Type Parameters
the type of the data being written