A note on reliable network comms:
I'm working on a small installation at the Cambridge MakeSpace which includes 4 or 5 Android devices communicating with each other while playing videos and controlling servos etc. I originally used UDP broadcasting to talk between these devices and although I know UDP is an inherently unreliable protocol, it seemed to be performing pretty well until..... I started do lots of things at the same time such as controlling animations and playing videos while listening for UDP messages.
So the solution was to switch to Web Sockets. Now I run a web server on each device and communicate using Web Sockets which has made a huge difference. The communications are now very reliable and very fast.
Note: You can use the 'readyState' of a web socket to detect it's current state and re-open it if necessary (eg. App at the other end has been restarted)
if( ws.readyState != 1 ) OpenMySocket();
Also, you send as much data as you like on a Web Socket as it is message based and will automatically collect all the network packets for you and fire the callbacks when complete.. which is nice :)