Chapter 3. Exploring the AsyncTask
In Chapter 2, Performing Work with Looper, Handler and HandlerThread, we familiarized ourselves with the most basic asynchronous and concurrency constructs available on the Android platform: Handler
and Looper
. Those constructs underpin most of the evented and sequential processing used by the main thread to render the UI and to run the Android components life cycle.
In this chapter, we are going to explore android.os.AsyncTask
, a higher level construct that provides us with a neat and lean interface to perform background work and publish results back to the main thread without having to manage the thread creation and the handler manipulation.
In this chapter we will cover the following topics:
- Introducing AsyncTask ...
Get Asynchronous Android Programming - Second 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.