4. Async Tasks and Loaders

Try to understand what the author wished to do, and do not blame him for not achieving what he did not attempt.

John Updike, Picked-Up Pieces

The AsyncTask is the first Android concurrency tool to which most developers are introduced when learning the platform. It is a clever and powerful tool for certain kinds of jobs. Unfortunately, developers who have not yet discovered any other tools frequently apply it in situations for which it is completely inappropriate. Community knowledge of best practices for using AsyncTasks—and even some prejudice against using it at all—become more firmly established and more broadly distributed than they were even five years ago. Still, including the word “thread” in a question posted ...

Get Android™ Concurrency 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.