Probably should have been posted to the
Android development forum but oh well.
If you just use getSharedPreferences() on a component you are creating an private shared preference only available to that activity. Use a
PreferenceManager to get the default shared preference file instead.
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); // Add a key/value pair SharedPreferences.Editor editor = prefs.edit(); boolean myValue = true; editor.putBoolean("myKey", myValue); editor.commit(); // Retrieve a value prefs.getBoolean("myKey", true);