iOS Question communicate via bluetooth or wifi??

ilan

Expert
Licensed User
Longtime User
hi

does anyone know if its possible to communicate between 2 ios devices via bluetooth or wifi??

just sending string no images only string...

thanx
 

ilan

Expert
Licensed User
Longtime User
thanx erel

i looked in it and tried it but nothing happens when i send string

i used the same code install the app on my ipad and iphone4 both connected to the same wifi

do i need to change the host maybe??

(sorryi do it for the first time :oops:)
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
i could manage to send a string between the two devices like this

B4X:
  Dim p As UDPPacket
   p.Initialize("Important message".GetBytes("UTF8"), "192.168.2.3", 18901)
   USocket.Send(p)

i just change the ip and put the other device ip and used the same port the that i intialize USocket in app start
and it worked

is it possible to get a list of all connected devices to the same wifi?? like this i could choose the opponent ip...
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
ok erel, i solved it (was not easy)

i think there is a bug, when i send a word that include the letter "X" several times it arrived the first time as an "X" but then it arrived as "8" so i used only numbers and it worked (maybe it has something todo with UTF8??)

numbers allways arrived as sent...

thank you
 
Upvote 0
Top