I am using SharedPreferences in my android app. I am using both commit() and apply() method from shared preference. When I use AVD 2.3
SharedPreferences
commit()
apply()
Use apply().
It writes the changes to the RAM immediately and waits and writes it to the internal storage(the actual preference file) after. Commit writes the changes synchronously and directly to the file.