Use clear()
method:
SharedPreferences.Editor editor = PreferenceManager.getDefaultSharedPreferences(this).edit();
editor.clear()
editor.apply()
More Related Contents:
- How do I get the SharedPreferences from a PreferenceActivity in Android?
- Which Android Data Storage Technique to use?
- Is it ok to save a JSON array in SharedPreferences?
- How to save List to SharedPreferences?
- How to save and retrieve Date in SharedPreferences
- How to compare value 3.0.1 with 3.0.2 where these two numeric values are in String ? [closed]
- How to count the number of documents under a collection in Firestore?
- Firestore – Merging two queries locally
- MathML and Java [closed]
- how to convert milliseconds to date format in android?
- Converting a string to an integer on Android
- Android Reading from an Input stream efficiently
- Ionic build Android error when downloading Gradle
- How to select and crop an image in android?
- Android Color Picker [closed]
- Check for Active internet connection Android
- Android Telegram App –> java.lang.UnsatisfiedLinkError: No implementation found for void
- Can’t get location and email using Facebook API
- How do I remove a specific element from a JSONArray?
- Displaying integer on toast
- How to create thumbnail of video url form server
- NetworkSecurityConfig: No Network Security Config specified — Android 7.0 error?
- How to override the cipherlist sent to the server by Android when using HttpsURLConnection?
- How to use interceptor to add Headers in Retrofit 2.0?
- Android Studio Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
- Why is XML used for the creation of UI layouts in Android?
- Android – Generate CSV file from table values
- Convert Uri to String and String to Uri
- Read data from SQLite where column name contains spaces
- Class must either be declared abstract or implement abstract method error