Chapter 4. Exploring the Loader

In the previous chapter we familiarized ourselves with the simplest and high level, Android-specific, asynchronous construct; the android.os.AsyncTask. The AsyncTask is a lean construct used to create background work that offers a simple interface to publish results and send progress to the main thread. In this chapter we are going to move our focus to android.content.Loader, a high level Android-specific pattern used to load content asynchronously from content providers or data sources over a worker thread with content change capabilities and component lifecycle awareness.

In this chapter we will cover the the following topics:

  • Introducing loaders
  • Loader API
  • Loader lifecycle
  • Loading data with Loader
  • Building responsive ...

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.