How do I clear all preferences on Android?
Answer
Use the clear() method in a SharedPreferences. Editor object to remove all the data stored in the preferences. Use the apply() method in a SharedPreferences. Editor object to save the changes to the preferences file.