O'Reilly logo

Asynchronous Android by Steve Liles

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

Summary

The Loader framework in Android does a wonderful job of making it easy to load data in the background and deliver it to the main thread when it is ready.

In this chapter we learned about the essential characteristics of all Loaders—background loading, caching of loaded data, and a managed lifecycle.

We took a detailed look at AsyncTaskLoader as a means to perform arbitrary background loading, and CursorLoader for asynchronous loading from local database Cursors.

We saw that Loaders can free us from some of the constraints imposed by the Activity lifecycle, and took advantage of that to continue to work in the background even across Activity restarts.

In the next chapter we'll free ourselves completely from the constraints of the Activity

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