We are saving the following from one application:
final CheckBoxPreference mCheckPref = new CheckBoxPreference(sContext);
mCheckPref.setKey("alertnotification");
and we are retrieving it from a second application follows:
mContext = context.createPackageContext("com.android.abc",Context.CONTEXT_INCLUDE_CODE | Context.CONTEXT_IGNORE_SECURITY);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(mContext);
boolean alertnotification = prefs.getBoolean("alertnotification",true);
I always get the alertnotification as false, even during the first time where I have set the default value to be true. Why does this happen?