-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
Based on discussion in #153293 there is a thorny use case we didn't consider in switching the backend from SharedPreferences to DataStore on Android: some external systems that app developers don't control (a notable example from that issue is GDPR consent data docs, more docs) write important information directly to SharedPreferences.
Supporting the legacy API forever is not ideal, especially given issues like #151036 that make use cases like this one troublesome with the legacy API. We could consider making the backing store a configuration option on Android. That would mean fully supporting both systems indefinitely though, even though for most use cases the docs seem to strongly discourage use of SharedPrefences.
Another option would be an alternate API—probably just exposed as a sidecar in shared_preferences_android rather than plumbed through to the app-facing package—that provides async-only, read-only access to SharedPreferences for this specific use case.
The Android team should weigh in here on how we want to support this. Also /cc @tarrinneal.