Android Tutorial 68 - Reading and Writing Preferences

Published: 25 March 2014
on channel: Code Here Now
1,548
5

This is an excerpt from Learn by Doing - Android for Beginners on Udemy.
https://www.udemy.com/learn-by-doing-...

You will learn how to,

1. Read from Preferences
2. Write to Preferences

Things to Remember
-----------------------------
1. Obtain an instance of your SharedPreferences using the PreferenceManager.getDefaultSharedPreferences(Context) method.

2. Use the SharedPreferences.get*(String, *) set of methods to read a preference.

3. In order to write to a preference you will need an instance of an Editor, which is available from SharedPreferences.edit() method.

4. Put in new preferences using the Editor.put*(String, *) set of methods.

5. And make sure that you call the Editor.commit() method to save your changes.


Watch video Android Tutorial 68 - Reading and Writing Preferences online without registration, duration hours minute second in high quality. This video was added by user Code Here Now 25 March 2014, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,548 once and liked it 5 people.