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.
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.
To learn more about this topic, see the following related guides:
- Optimize battery life
- Transfer data without draining the battery
- Web apps
- Transmit network data using Volley
You can also check out the Android BasicNetworking Sample.
- Connecting to the Network
- Learn how to connect to the network, choose an HTTP client, and perform network operations outside of the UI thread.
- Managing Network Usage
- Learn how to check a device's network connection, create a preferences UI for controlling network usage, and respond to connection changes.
- Parsing XML Data
- Learn how to parse and consume XML data.