What are Android preferences?

Preferences for our application that are persisted and retrieved by Android's shared preferences mechanism are called shared preferences. Shared preferences themselves represent XML data that is accessed and modified by Android and its API. Android handles all the work for us regarding retrieving and saving preferences. It also provides the mechanism for these preferences to be private, hidden from the public access. Android SDK has a great set of classes for preferences management. Also, there are abstractions available so you are not limited to default XMLs, but you can create your own persistence layer.

Get Mastering Android Development with Kotlin now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.