Chapter 6. Networking and web services

 

This chapter covers

  • Networking basics
  • Determining network status
  • Using the network to retrieve and store data
  • Working with web services

With the ubiquity of high-speed networking, mobile devices are now expected to perform many of the same data-rich functions of traditional computers such as email, providing web access, and the like. Furthermore, because mobile phones offer such items as GPS, microphones, CDMA/GSM, built in cameras, accelerometers, and many others, user demand for applications that leverage all the features of the phone continues to increase.

You can build interesting applications with the open Intent- and Service-based approach you learned about in previous chapters. That approach combines built-in (or custom) intents, such as fully capable web browsing, with access to hardware components, such as a 3D graphics subsystem, a GPS receiver, a camera, removable storage, and more. This combination of open platform, hardware capability, software architecture, and access to network data makes Android compelling.

This doesn’t mean that the voice network isn’t important—we’ll cover telephony explicitly in chapter 7—but we admit that voice is a commodity—and data is what we’ll focus on when talking about the network.

6.1. An overview of networking

6.2. Checking the network status

6.3. Communicating with a server socket

6.4. Working with HTTP

6.5. Web services

6.6. Summary