I save the value in one activity like this:
sPref = getPreferences(MODE_PRIVATE); SharedPreferences.Editor edit = sPref.edit(); edit.putBoolean(ON_CAMERA, true); edit.commit(); And I get in another way:
sPref = getPreferences(MODE_PRIVATE); Boolean bl = sPref.getBoolean(ON_CAMERA, false); The problem is that bl always false . After reading the literature, I noticed that SharedPreferences works with only one activity. Tell me how to save and get the value correctly?
PS I save the setting value, which is true or false (the default) in one activation, and in the other I should get this value, depending on which change the behavior of the button.