I need to access settings from various activities in my Android app. Rather than messing around with SharedPreferences in various activities I want to create a Singleton class, and grab all the settings at once using SharedPreferences in the Singleton. I also want a method in the Singleton to save settings where required, again using SharedPreferences.
The trouble with this is that I need an Activity context to use SharedPreferences. Could I pass this into the Singleton.. I've read about memory leaks and am wary of doing this.
Or am I completely barking up the wrong tree and is there a better way of sharing application settings between activities?