I am writing a game for Android that requires a ton of simple data (stats, map locations etc…) to be stored in SharedPreferences.
To simplify and streamline this process I created a Settings class that uses static set and get methods for all the sharedprefs. Then I simply call settings.getXYZ() from anywhere else in the app.
Lately I have read that using static methods in Android is a bad idea in the long run. Is there a better way to accomplish this?
I would recommend you have a set of static methods in a public class designed to get and set any preferences as properties.
This is how I have it setup in my apps, and it works great! As long as you treat them as static objects, you should have no issues.