Today I'm going to talk about how I manage Android SharedPreferences in my application. Not a long time ago, I posted about SharedPreferences, so you can take a look back if you don't have any idea yet about SharedPreferences.
I basically used the setter and getter methods, which has been regarded as "evil" by many developers. I'm just a self thought programmer, I'm open to any suggestions by you guys especially if you are an advanced developer or knows a better implementation.
I feel convenient using this class, you can instantly write and read your SharedPreference values, especially if you choose to store several SharedPref values for your app. You just have to pass the context and then bam! You can use it even for a non-activity class.
How To Use?
Just an example of my SharefPreferencesManager Class.
For FREE programming tutorials, click the red button below and subscribe! :)