Is there a method to set default values in shared preferences?
Here is my load preferences code
public void LoadPreferences() {
SharedPre
When you are setting preference with key and value,you are actually giving the value.So this time no question of using the default value.See, when you are retrieving the value you can define a default value if the value is not set previously.
String strSavedMem1 = sharedPreferences.getString("MEM1", "default");
if you get strSavedMem1="default" then surely it is by default as you didn't set any other value to MEM1 in the preference