O'Reilly logo

Android in Action, Second Edition by Chris King, Robi Sen, W. Frank Ableson

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 5. Storing and retrieving data

This chapter covers

  • Storing and retrieving data with SharedPreferences
  • Using the filesystem
  • Working with a SQLite database
  • Accessing and building a ContentProvider

Android provides several ways to store and share data, including access to the file-system, a local relational database through SQLite, and a preferences system that allows you to store simple key/value pairs within applications. In this chapter, we’ll start with preferences and you’ll create a small sample application to exercise those concepts. From there, you’ll create another sample application to examine using the filesystem to store data, both internal to our application and external using the platform’s Secure Digital (SD) card support. ...

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