Search code examples
androidandroid-networking

Best way and flexible ways to communicate server networking in android?


I read from many blogs about it, i found 3 way to communicate server in android.

  1. java.net (using socket)

  2. org.apache.http

  3. android.net

I'm new in android networking, i want to learn fast choosing only 1 steps, my target API is 8, they said that when using API 8, using org.apache is good, but they also said that java.net or native style is best because u can implements all using native style, any suggestion from the 3 choices above, and what are pros and cons from the 3 choices, thanks!


Solution

  • The best and most recent way to do a communication between an Android device and a server is through volley library this has been introduced recently in google conference and there was a proposal to make this library the default Android library for networking, it makes networking faster and easier.

    The library is supported from API 8 onwards, you can watch the conference video provided in the previous link to know more about the structure, and here are the some tutorials you can refer to it. tutorial 1, tutorial 2.

    good luck.