Exploring Android Persistence and Content Providers
There are a number of ways of saving state in the Android SDK. Some of these are 1) shared preferences, 2) internal files, 3) external files, 4) SQLite, 5) content providers, 6) O/R mapping tools, and 7) network storage in the cloud. We will briefly introduce each of these state-saving options first and then cover in detail managing application state using SQLite and content providers.
Saving State Using Shared Preferences
We have covered shared preferences in Chapter 11. Shared preferences are key/value-based XML files owned by your application. Android has a framework on top of this general persistence mechanism to display/update/retrieve preferences without writing a lot of ...