SharedPreferences have method getAll, but it returns no entries despite the fact some keys exist:
PreferenceManager.getDefaultSharedPreferences(this).contains("addNewAddress");
returns true
Map<String, ?> keys=PreferenceManager.getDefaultSharedPreferences(this).getAll();
returns empty map
What is wrong? How to get list of all shared preferences?
What you can do is use
getAll()method ofSharedPreferencesand get all the values inMap<String,?>and then you can easily iterate through.For more you can check
PrefUtil.java'sdump()implementation.