ClientBleGattCharacteristic
A helper class which provides operations which can happen on a GATT characteristic. Its main responsibility is to provide write/read/notify features in a synchronous manner, because simultaneous calls will be ignored by Android API.
Properties
Functions
Link copied to clipboard
Finds a descriptor by UUID.
Link copied to clipboard
suspend fun getNotifications(bufferSize: Int = 0, bufferOverflow: BufferOverflow = BufferOverflow.DROP_OLDEST): Flow<DataByteArray>
Enables and observes notifications/indications of the characteristic. After subscriber is closed the notifications should be disabled.
Link copied to clipboard
Reads value from a characteristic and suspends for the result.
Link copied to clipboard
Writes bytes to a characteristic and waits for a request to finish. If value is bigger than MTU then it splits the value and send it in consecutive messages.
Link copied to clipboard
Writes bytes to a characteristic and waits for a request to finish.