Question: I've implemented a `OnPreferenceChangeListener` on two preference object in my preference page ( extends `PreferenceActivity`)  

But ever since the preference value isn't updated upon change,  

I even tried using :

```
SharedPreferences sharedPreferences = getSharedPreferences("myCustomSharedPrefs",
        Activity.MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putInt(preference.getKey(), Integer.parseInt(newValue.toString()));
editor.commit();

```

Where `preference` is the changed preference and `newValue` is the new value...  

What am I missing ?

Thanks

Answer: 
You need to return true to get the value updated, see the [Android documentation](http://developer.android.com/reference/android/preference/Preference.OnPreferenceChangeListener.html).
Can you see if preference.getKey() is giving the correct name? Can you print in your console and see. Code looks clean to me. May be the name is different than what is expected. 

Also make sure that the value is also having the correct value.