Skip to content

Most visited

Recently visited

added in API level 1


This package allows applications to store and retrieve user and system preference and configuration data. This data is stored persistently in an implementation-dependent backing store. There are two separate trees of preference nodes, one for user preferences and one for system preferences.


NodeChangeListener A listener for receiving preference node change events. 
PreferenceChangeListener A listener for receiving preference change events. 
PreferencesFactory A factory object that generates Preferences objects. 


AbstractPreferences This class provides a skeletal implementation of the Preferences class, greatly easing the task of implementing it. 
NodeChangeEvent An event emitted by a Preferences node to indicate that a child of that node has been added or removed. 
PreferenceChangeEvent An event emitted by a Preferences node to indicate that a preference has been added, removed or has had its value changed. 
Preferences A node in a hierarchical collection of preference data. 


BackingStoreException Thrown to indicate that a preferences operation could not complete because of a failure in the backing store, or a failure to contact the backing store. 
InvalidPreferencesFormatException Thrown to indicate that an operation could not complete because the input did not conform to the appropriate XML document type for a collection of preferences, as per the Preferences specification. 
This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields


Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience. (Dec 2017 Android Platform & Tools Survey)