O'Reilly logo

Introduction to Android™ Application Development: Android Essentials, Fourth Edition by Joseph Annuzzi Jr., Lauren Darcey, Shane Conder

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

11. Using Android Preferences

Applications are about functionality and data. In this chapter, we explore the simplest way you can store, manage, and share application data persistently within your Android applications: by using shared preferences. The Android SDK includes a number of helpful APIs for storing and retrieving application preferences in different ways. Preferences are stored as groups of key/value pairs that can be used by the application. Shared preferences are most appropriate for storing simple kinds of data, such as application state and user settings, in a persistent fashion.

Working with Application Preferences

Many applications need a lightweight data-storage mechanism called shared preferences for storing application state, ...

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