I am using Bluetooth to send/receive info in a SQLite database. I have done this successfully with text data thanks to the Serial example provided in the tutorial on this topic. However, I don't see how to transfer an image in a byte array. I'm sure I need to use ReadBytes and WriteBytes to do this but I just can't get the syntax of defining, initilializing and use these correctly. I've tried a dozen combinations without success. The working program summary I'm using successfully for text is shown below. What is the byte array equivalent? I have the image in 'buffer1' as extracted from an SQLite BLOB.
B4X:
Dim Serial1 As Serial
Dim TextReader1 As TextReader
Dim TextWriter1 As TextWriter
Dim buffer1() as byte
Dim thisText as String
...
Serial1.Initialize("Serial1")
TextReader1.Initialize(Serial1.InputStream)
TextWriter1.Initialize(Serial1.OutputStream)
...
TextWriter1.WriteLine("Some text here")
thisText = TextReader1.ReadLine