send file to other device using bluetooth

hanyelmehy

Well-Known Member
Licensed User
Longtime User
I try to send file to other phone using bluetooth ,the problem is nothing is send , i am able to detected device and connect to it but no files send

[ code ]
Sub Serial1_Connected (Success As Boolean)
If Success = False Then
Log(LastException.Message)
ToastMessageShow("Error connecting: " & lastException.Message, True)
Else

File.WriteString(File.DirRootExternal, "Fatwa.txt",Module1.TxtForSend)


Dim In As InputStream
In = File.OpenInput(File.DirRootExternal, "Fatwa.txt")
Dim out As OutputStream
out=Serial1.OutputStream

out.InitializeToBytesArray(1000)
File.Copy2(In, out)
Dim data() As Byte
data = out.ToBytesArray


out.WriteBytes(data ,0,data.Length)
out.Flush

End If
[ /code ]

need help to solve this issue ,thank you
 
Last edited:

hanyelmehy

Well-Known Member
Licensed User
Longtime User
Thank you for your time

Thank you for your time
i want to simulate send file using Bluetooth in my device ,that mean i want to send file to any device support Bluetooth , so there is no other device code

can we able to use OBEX protocol

Thank you
 
Upvote 0
Top