O'Reilly logo

Android Application Security Essentials by Pragati Ogal Rai

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

User preferences

An application collects user preferences in two ways. In the first case, an application presents a settings screen to the user to choose preferences such as language, number of results to show per page, and so on. Such preferences are best stored using the Preference class. The other case is when user preferences are picked up as the user navigates through the application. For example, when searching for a book, the user selects books by a particular author. An application might want to save such a preference for the next time when the user logs in. Such user preferences are best stored using SharedPreferences. Under the hood, the Preference class also calls SharedPreferences. Please note that SharedPreferences only persist primitive ...

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