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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.