01.05.2011 12:14, Boozel пишет:
Then in my broadcast receiver i use sharedPreferences = context.getSharedPreferences("SignalSpot", 0); and then sharedPreferences.getBoolean("disconNotification", false); which always returns the default.

Call this to get the shared preferences object used by your prefs activity:

SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);


I think i need to call addPreferencesFromResource(R.xml.settings); but i cannot do that from within the BroadcastReceiver. What am i missing?

This has nothing to do with the issue. Preference values are not stored in your package's xml files.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to