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
Thanks. I read the AsyncStreams tutorial, downloaded the sample program and ran it successfully. I also read your Networker's Guide to the Galaxy carefully. That answered a lot of questions I had. But I'm still not clear as to which network solution would be right for my particular app. I want to automatically connect to other nearby phones/tablets running my software with as little user intervention as possible. The apps would handshake, notify the user when a matching app was found and exchange some information upon the user's request. I realize this may not be completely possible for obvious security reasons but I'd still like to limit user input in making the connection as much as possible. The data needs are not great, a picture (under 2Mb) and a few profile text fields.
I'd appreciate your suggestion as to the best network took to use.