SyntaxFix
Write A Post
Hire A Developer
Questions
The Kotlin ktx way to clear all preferences:
val prefs: SharedPreferences = getSharedPreferences("prefsName", Context.MODE_PRIVATE) prefs.edit(commit = true) { clear() }
Click here for all Shared preferences operations with examples