Accessing SharedPreferences through static methods
问题 I have some information stored as SharedPreferences. I need to access that information from outsite an Activity (in from a domain model class). So I created a static method in an Activity which I only use to get the shared preferences. This is giving me some problems, since apparently it is not possible to call the method \"getSharedPreferences\" from a static method. Here\'s the message eclipse is giving me: Cannot make a static reference to the non-static method getSharedPreferences(String,