25 Loopers, Handlers, and HandlerThread

Now that you have downloaded and parsed JSON data from Flickr, your next task is to download and display images. In this chapter, you will learn how to use Looper, Handler, and HandlerThread to dynamically download and display photos in PhotoGallery. Along the way you will gain a deeper understanding of your app’s main thread and further explore restrictions around what work can be done on the main thread versus what work can be done on a background thread. Finally, you will learn how to communicate between the main thread and a background thread.

Get Android Programming: The Big Nerd Ranch Guide, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.