Closed Shunt22 closed 1 year ago
You can pass a characterDelimiter
that never will be received by your device.
You can pass a
characterDelimiter
that never will be received by your device.
In my case I transfer pretty much random data bytes (audio data), so I can't for sure say which character will never appear. I tried '\n', '\0',0x00, etc as characterDelimiter, but these characters sometimes occur in data stream and OnDataRead is called.
As mentioned in #41
OnDataRead
will be called when acharacterDelimiter
is received, or when the total data received exceeds the character limit ofbufferSize
.Originally posted by @douglasjunior in https://github.com/douglasjunior/AndroidBluetoothLibrary/issues/41#issuecomment-787958999
Is there anyway to set OnDataRead to be called ONLY when
config.bufferSize
is reached? I don't care about character delimiter. Just want to read fixed-size portions of data.