In my previous android application release i was using default shared preference.But now i'm using my own app specific preference to store data.I want to clear old preference from all installed application using play store app release update. Any suggestions
Asked
Active
Viewed 381 times
0
-
SharedPreferences.Editor.clear().commit(); – Illegal Argument Sep 16 '14 at 06:18
-
I know this but how to clear data from the users who already have the application. – Key_coder Sep 16 '14 at 06:19
-
for those users clearing will only happen after app update after adding my code below. there is no other way – Illegal Argument Sep 16 '14 at 06:22
-
i got the solution http://stackoverflow.com/questions/7103453/sharedpreferences-update-unisntall – Key_coder Sep 16 '14 at 06:31
1 Answers
0
Try this:
SharedPreferences.Editor editor = getSharedPreferences("myPref", Context.MODE_PRIVATE).edit();//type the old preference file name
editor.clear().commit();

Illegal Argument
- 10,090
- 2
- 44
- 61