tags:

views:

39

answers:

1

I have a doubt, I don't know how to retrieve the key from the shared preference?

+2  A: 

Use getAll() and iterate over the map to get the keys.

Map<String, Object> prefs = sharedPrefs.getAll();

for(Map.Entry entry : prefs.entrySet()) {
    String key = entry.getKey();
}
BrennaSoft
Thanks a lot dear. This solution really very help full for me.
Important on SO, you have to mark accepted answers by using the tick on the left of the posted answer, below the voting. This will increase your rate.
Pentium10