title: What's the difference between commit() and apply() in SharedPreferences
body: <p>I am using <code>SharedPreferences</code> in my android app. I am using both <code>commit()</code> and <code>apply()</code> method from shared preference. When I use AVD 2.3 it shows no error, but when I run the code in AVD 2.1, <code>apply()</code> method shows error. </p>
  
  <p>So what's the difference between these two? And by using only <code>commit()</code> can I store the preference value without any problem?</p>