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.
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 ...