0

I need UDP Communication between my device and/or an another android device / iPhone / Server etc.

While exploring the android developer site I found that their are two packages java.net (plain Java Classes) and android.net(Looks like they are android specific implementations). Which set of classes I should use so that I don't get any problem while connecting to other devices. Which is the most efficient way to provide UDP socket communication in Android. I saw Android UDP Communication but that also looks incomplete.

2
  • 1
    There are no UDP communications-related classes in android.net AFAIK. Commented Apr 12, 2012 at 13:08
  • @CommonsWare Yes, you can add your comment as answer. :) Commented Apr 12, 2012 at 13:09

2 Answers 2

1

For UDP, Android relies on java.net packages it self. You should use Java.

Sign up to request clarification or add additional context in comments.

Comments

0

You can use standard java.net.UserDatagramSocket/Packet. Here is the official documentation and example.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.