title: Default SharedPreferences don't save values
body: <p>I have this class:</p>
  
  <pre><code>public class SharedPreferenceUtil {
  
  private SharedPreferences prefs;
  
  private static final String PRODUCTION_MODE_URL_GET_CHECKLIST_JSON = "www.exemplo.com/json";
  
  //configuration keys
  private static final String KEY_URL_GET_CHECKLIST_JSON = "KEY_URL_GET_CHECKLIST_JSON";
  
  public SharedPreferenceUtil(Context context){
      prefs = PreferenceManager.getDefaultSharedPreferences(context);
  }
  
  private void initializeDefaultAppConfigurationValues(){
      prefs.edit().putString(KEY_URL_GET_CHECKLIST_JSON, PRODUCTION_MODE_URL_GET_CHECKLIST_JSON);
      prefs.edit().commit();
  }
  
  public Configuration getConfiguration() {
      Configuration configuration = new Configuration();
  
      initializeDefaultAppConfigurationValues();
  
      configuration.setChecklistGetURL(prefs.getString(KEY_URL_GET_CHECKLIST_JSON,""));
  
      return configuration;
  }
  
  }
  </code></pre>
  
  <p>When I save the values ​​in row: prefs.edit () commit ().. It returned true. When I try to read the value in: prefs.getString (KEY_URL_GET_CHECKLIST_JSON, ""). It returned "" as if the value had not been saved.</p>
  
  <p>Could someone help me with this problem.</p>