I was able to transfer image files over wifi from my vb.net program to my android device and it works great. What I want to do now is do the samething, but using bluetooth because I may not be able to connect my devices over wifi. I figured the easiest option would be to transfer over a serial port. I tried modifying the code to work over a serial port and no go. I basically tried to take what I did with wifi and asyncstreamsprefix, but is not working. I did some searching on the web and found some code I was able to make work. I had to use asyncsteam without the prefix though. When I send the file over from my vb.net program I can see the binary symbols of the file in the text box of the b4a app. So I am sending over I just don't know how to take what I am sending and save it to a file. I am using the example b4a bluetooth app on the android device. Looking for some help.
Thank you
B4X:
fileToSend = "c:\test\test1.png"
Dim oFile As System.IO.FileInfo = New System.IO.FileInfo(fileToSend)
Dim numBytes As Long = oFile.Length
Dim fStream As New FileStream(fileToSend, FileMode.Open, FileAccess.Read)
Dim br As New BinaryReader(fStream)
Dim data As Byte() = br.ReadBytes(CInt(numBytes))
br.Close()
fStream.Close()
SerialPort1.Write(data, 0, numBytes)
Thank you