Skip to content

Latest commit

 

History

History
13 lines (12 loc) · 785 Bytes

README.md

File metadata and controls

13 lines (12 loc) · 785 Bytes

Android-PreferenceDemo

Sample app to demonstrate how to use Android SharedPreferences in easy way.

  • Using singelton class to access/update SharedPreferences
  • No need to pass context always for read/write SharedPreferences
  • It uses apply() instead of commit()
  • apply() is asynchronus save, doesn't return anything, it update value in memory first & changes are written to disk later asynchronusly.
  • commit() is synchronus save, it return true/false based on outcome. Changes are written to disk synchronusly
You can see more details here