Join David Gassner for an in-depth discussion in this video Using preferences in Android apps, part of Android SDK: Local Data Storage.
The simplest and smallest sort of data that you can store persistently on disk…in an Android app is called a preference.…There are a couple of different ways of creating preferences in an…application, and they are sometimes referred to as simply preferences and…sometimes as shared preferences.…You can initialize preferences either in Java code or through a preference…activity--a visual interface that you create just like you do any activity.…Each preference value is a simple key-value pair.…
The keys are always strings, but the values can have one of a number of…different types, including Booleans, integers, longs, floats, and strings.…It's also possible to create a single preference value that consists of multiple…strings that are typed as a Java set.…You can create your preferences in Java by using a class…called SharedPreferences.…You start by creating an instance of this class.…Whenever you create a SharedPreferences object, you always assign a mode, and the…most common is called MODE_PRIVATE.…
- Exploring local data storage options
- Creating an Android virtual device
- Starting a new project
- Defining preferences with Java and activities
- Creating and reading JSON and XML data files
- Creating a new SQLite database
- Inserting and retrieving data in the database
Skill Level Intermediate
1. Getting Started
2. Using Application Preferences
3. Using Internal and External File Storage
4. Working with SQLite Databases
5. Managing and Displaying SQLite Data
Improving the data display9m 29s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.