Hi, Guys
I have a problem with getting the UDP send/receive to work when implementing the example given in the Network documentation for UDPsocket. see https://www.b4x.com/android/help/network.html#udpsocket
I put the example into a simple project (attached) but when I run it on my phone the UPD_PacketArrived() event does not trigger (its associated msgbox is not shown and does not hit the breakpoint in debug). I have tried installing the software on multiple phones but none appear to work.
Background: I have an App which uses standard server/client LAN operation and communicates successfully using TCP (for reliability). However, the user must enter the server IP address into the client before the App can start to communicate. I would like to make this process automatic. So if the Server end sends its IP address periodically using UDP, then hopefully the client will pick it up and switch to TCP to start the communications process.
Assuming however it is possible for a device to transmit its IP address using UDP which can be received by all listening devices, if not, its back to the drawing board!
Any input would be appreciated.
Kind regards
Dave
I have a problem with getting the UDP send/receive to work when implementing the example given in the Network documentation for UDPsocket. see https://www.b4x.com/android/help/network.html#udpsocket
I put the example into a simple project (attached) but when I run it on my phone the UPD_PacketArrived() event does not trigger (its associated msgbox is not shown and does not hit the breakpoint in debug). I have tried installing the software on multiple phones but none appear to work.
Background: I have an App which uses standard server/client LAN operation and communicates successfully using TCP (for reliability). However, the user must enter the server IP address into the client before the App can start to communicate. I would like to make this process automatic. So if the Server end sends its IP address periodically using UDP, then hopefully the client will pick it up and switch to TCP to start the communications process.
Assuming however it is possible for a device to transmit its IP address using UDP which can be received by all listening devices, if not, its back to the drawing board!
Any input would be appreciated.
Kind regards
Dave