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. ...

Get Android in Action, Second Edition 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.