O'Reilly logo

Android App Development For Dummies, 3rd Edition by Michael Burton

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

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 www.sqlite.org ...

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