My android application has two kinds of preferences:
1) I have user preferences defined in res/xml/preferences.xml so that users can manage their pr
Let us assume that your xml reads like this:
I assume you use a PreferenceActivity to load the preferences from your xml. So in your activity you do addPreferencesFromResource(R.xml.application_pref);
When you do this, by default, all the values are stored in the default SharedPreference of the application. You can access these preferences in anywhere you want. So from some other activity/service just do:
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
boolean value = prefs.getBoolean("gpsOn", false);
And just like that you should get the user's preference in value.