Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to work with UDP in Android?

I am very new to the Android platform. I need to make a connection with a UDP server by using my Android UDP client. Now, I need to know how to work with UDP in Android. Please guide me to do this.

like image 307
2 revs Avatar asked Jun 22 '10 12:06

2 revs


1 Answers

You can work with UDP in Android applications just like in any Java app, with java.net.DatagramSocket and java.net.DatagramPacket. There's a short sample app available at http://www.anddev.org/udp-networking_-_within_the_emulator-t280.html

like image 56
cristis Avatar answered Sep 29 '22 07:09

cristis