Chapter 13

Getting Persistent with Data Storage

In This Chapter

arrow Discovering data storage

arrow Creating an SQLite database

arrow Querying your database

arrow Using loaders and adapters

In certain types of applications, Android requires application developers to use data persistence, where information about a user’s preferences, such as favorite background colors or radio stations, is saved on the device for reuse later, after the device is turned off and then on again. For example, the Tasks application wouldn’t be useful if it didn’t save tasks, would it? Thankfully, the Android platform provides a robust set of tools that you can use to store user data.

This chapter delves deeply into creating and updating an SQLite database and producing a ContentProvider to access it. You need to be familiar with a certain level of database theory to tackle the data storage tasks in this ­chapter.

If you’re unfamiliar with SQL (Structured Query Language) or the SQL database, see the SQLite website at ...

Get Android App Development For Dummies, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.