Answers to Self-Review Exercises

  1. 9.1

    1. Cursor.

    2. ContentProvider.

    3. getArguments.

    4. result set.

    5. FragmentManager.

    6. Loaders, LoaderManager.

  2. 9.2

    1. True.

    2. False. It’s considered good practice to ensure that Cursor method moveToFirst returns true before attempting to get data from the Cursor.

    3. True.

    4. False. An Activity’s or Fragment’s Loaders are created and managed by its LoaderManager (package android.app), which ties each Loader’s lifecycle to its Activity’s or Fragment’s lifecycle.

    5. True.

    6. False. A ContentProvider and ContentResolver handle communication for you—including between apps if your ContentProvider exposes its data to other apps.

Get Android How to Program, 3/e 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.