This is pretty ugly my dude, you depend on a static variable that you init on MainActivity, what happens if your code calls this PreferenceHelper after an async operation and preferences static variable has been cleared?? With all my respect this is a bad approach.

Reply