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
2010-07-22 13:38:08
Thanks a lot dear. This solution really very help full for me.
2010-07-23 04:33:28
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
2010-07-23 08:40:10