I'm prototyping a new greenfield app in Compose. I'm a little unclear on whether SharedPreferences is still the way to keep track of app specific settings. I've used it to that end before, but then I see references to Jetpack Preferences. But that seems more like a UI framework for a settings screen. I just want to persist 3 keyed booleans that get set while a user uses the app, so that when they run it again, those are the default values
The Settings interface has implementations on the Android, iOS, macOS, watchOS, tvOS, JS, JVM, and Windows platforms.
What about Linux?? It feels like an odd platform to leave out. (also it's the one I'd need 😅)
Maybe it's just not mentioned??
m
Manuel Lilienberg
04/25/2023, 12:25 PM
If i am not mistaken macOS, Windows and Linux can all use the JVM implementation.
e
ephemient
04/25/2023, 8:54 PM
the JVM implementation uses java.util.prefs.Preferences#userRoot() which is provided by the JVM itself, usually backed by some platform-specific storage