Many of an Android application’s tasks are not performed on the main thread, but asynchronously on a separate thread. This increases the application’s user interface (UI) performance. Loaders, too, asynchronously load data and monitor the underlying data source for changes. In this chapter, you will learn about loaders—particularly,
CursorLoader. You will use
CursorLoader to access information in the
Contacts content provider. Finally, you will learn to create your own custom content provider.
As the name suggests, loaders are used to load data asynchronously. They are accessible in an activity and a fragment through the
LoaderManager handles the life cycle of loaders and the underlying ...