There is no difference in how you get and install SharedPreferencesas usual, and from that onResume. What you will need to do in addition to the last settings is updating any objects that you have in Activitythat use preference values. This ensures that yours Activitywill work with the latest values.
A simple example:
protected void onResume() {
super.onResume();
getPrefs();
}
private void getPrefs() {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
String myPref = prefs.getString("myPref", "");
}
source
share