OnReadyRead only when bufferSize is reached
As mentioned in #41
OnDataRead will be called when a characterDelimiter is received, or when the total data received exceeds the character limit of bufferSize.
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.
You can pass a characterDelimiter that never will be received by your device.
You can pass a
characterDelimiterthat 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.