How to get all values of SharedPreferences programmatically in Android

SharedPreferences stores all values in XML file. So, if you want to iterate through all the values stored in it, you could try following code.




In this code PrefData is a model class having two String variables for key and value.

About Krrishnaaaa

Socially known as Navkrishna.. An Android application developer. He likes to create tutorials and post them here or on YouTube or GitHub.. All these activities are shared on Facebook, Twitter, and G+ page.