Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm sending UDP packet to android over a wireless network from some other software . how can I receive that in android ? should I write a client in android to get the data?

share|improve this question

closed as off topic by Tetrad Apr 12 '12 at 15:36

Questions on Game Development Stack Exchange are expected to relate to game development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

There's nothing specific to game dev in this question, and there are similar questions already asked on SO (like…) – Tetrad Apr 12 '12 at 15:36

You need to set up a DatagramSocket to receive DatagramPackets via UDP. There's an example in this SO question.

share|improve this answer
but would it get the packet from network ? it does not matter who sends these packets? – matarsak Apr 12 '12 at 14:27
Part of setting up the DatagramSocket is defining what you are listening for... as in, the IP and PORT you expect to be getting packets to and from. – Myrddin Emrys Apr 12 '12 at 14:53
Generally telling people to google things in your answer body isn't a good idea. Shout at him in the question comments instead :). – Jonathan Dickinson Apr 12 '12 at 15:25
@matarsak how UDP works is extremely well documented on the internet - and they explain exactly how the packets arrive (answer: you get every packet that arrives on that NIC on that port - you need to decide if you want the packet). In addition as stevehb originally pointed out searching on Google got him the answer for Android straight away. You will continue to get short answers like this (or none at all) if you ask things that are so easy to find out yourself. – Jonathan Dickinson Apr 12 '12 at 15:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.