O'Reilly logo

Android in Practice by Michael Galpin, Charlie Collins, Matthias Kaeppler

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 7. Storing data locally

In this chapter

  • Reading and writing files
  • Setting and remembering shared preferences
  • Working with SQLite databases

Data is a precious thing and will last longer than the systems themselves.

Tim Berners-Lee

Data is essential to any application, and Android provides several local storage avenues. But Android doesn’t stop there—you also have access to data from other applications on the device and the network, which we’ll learn about in upcoming chapters. First, we’ll focus on local data storage.

To explore local data storage we’ll start with the filesystem. Don’t forget: Android devices are small computers, and they have filesystems. We’ll see how you can check whether the filesystem is available, how you ...

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