I have an Android application with more source packages. In the base package I have a PreferenceActivity used to configure the preferences of the app. From all the activities within the same package as the PreferenceActivity, I can access these preferences by using PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
However, from another package, activities use another shared preferences file when I call PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
. This stops me from accessing the preferences from the PreferenceActivity.
How can I solve this? I want to retrieve the same shared preferences in every package in the application.