Chapter 25 HTTP and Background Tasks
(We have added a filter to our PhotoGallery implementation to show only photos listed on Flickr
as having no known copyright restrictions. Visit http://www.flickr.com/commons/usage/ to learn more
about unrestricted images. All other photos on Flickr are the property of the person who posted them
and are subject to usage restrictions depending on the license specified by the owner. To read more
about permissions for using third-party content that you retrieve from Flickr, visit http://www.flickr.com/
creativecommons/.)
You will spend six chapters with PhotoGallery. It will take two chapters for you to get the basics
of downloading and parsing JSON and displaying images up and running. Once that is done, in
subsequent chapters you will add features that explore search, services, notifications, broadcast
receivers, and web views.
In this chapter, you will learn how to use Android’s high-level HTTP networking. Almost all day-to-
day programming of web services these days is based on the HTTP networking protocol. By the end
of the chapter, you will be fetching, parsing, and displaying photo captions from Flickr (Figure 25.2).
(Retrieving and displaying photos will happen in Chapter 26.)
Figure 25.2 PhotoGallery at the end of the chapter