O'Reilly logo

Android Application Development: A Beginner’s Tutorial by Budi Kurniawan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 23

Asynchronous Tasks

This chapter talks about asynchronous tasks and explains how to handle them using the AsyncTask class. It also presents a photo editor application that illustrates how this class should be used.

Overview

The android.os.AsyncTask class is a utility class that makes it easy to handle background processes and publish progress updates on the UI thread. This class is meant for short operations that last at most a few seconds. For long-running background tasks, you should use the Java Concurrency Utilities framework.

The AsyncTask class comes with a set of public methods and a set of protected methods. The public methods are for executing and canceling its task. The execute method starts an asynchronous operation and

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required