You should also read

Try it out

This class explains the basic tasks involved in connecting to the network,
monitoring the network connection (including connection changes), and giving
users control over an app's network usage. It also describes how to parse and
consume XML data.

This class includes a sample application that illustrates how to perform
common network operations. You can view the sample on GitHub (see the link
under Try it out) and use it as a source of reusable code for
your own application.

By going through these lessons, you'll have the
fundamental building blocks for creating Android applications that download
content and parse data efficiently, while minimizing network traffic.

Note: See the class Transmitting Network Data Using Volley
for information on Volley, an HTTP library that makes networking for Android apps
easier and faster. Volley is available on GitHub.
Volley may be able to help you streamline and improve the performance of your app's network
operations.