Is there a way to do the same thing that does clear data button from Settings->Application->Manage Applications to an application programmatically?
Or else i want on click to delete all sharedpreferences. How to do that?
Is there a way to do the same thing that does clear data button from Settings->Application->Manage Applications to an application programmatically?
Or else i want on click to delete all sharedpreferences. How to do that?
To delete all your application preference
SharedPreferences.Editor.clear()
method. See this documentation for details.What many users on Stackoverflow don't understand is; you want to delete ALL the shared preferences files. You don't want to clear them one by one.
You can simply delete all the files from your shared preferences folder:
Also check these answers for more information and other ways of deleting shared preferences.