DataStore Preferences and migrating from SharedPreferences
summary
Jetpack DataStore replaces heavy SharedPreferences use by offering Preferences DataStore for key‑value pairs and Proto DataStore for strongly typed protobuf objects, runs on Dispatchers.IO with coroutines and Flow, and ships a SharedPreferencesMigration that automatically migrates old files. Demo shows a launch counter app and a protobuf-backed filter settings store using the protobuf Gradle plugin and generated serializer; current artifact is alpha05, no built‑in encryption but serializers support custom encryption.
AI-written summary · about
chapters (8)
- 0:00Introduction to DataStore
- 1:09What is Jetpack DataStore
- 7:09Setting up Preference DataStore
- 13:08Understanding Protocol Buffers
- 17:06Setting up Proto DataStore
- 20:59Migrating from SharedPreferences
- 23:29Using DataStore in production
- 25:00Q&A session
related talks
25mThe New Modern Data Persistence on Android - Meet Jetpack Datastore
30mDataStore Preferences and migrating from SharedPreferences
27mSharing my preference for DataStore
26mSafely Migrating to DataStore in Production
19mJetpack DataStore - protocol buffers storage solution
34mStoring app data reliably & performantly with SimpleStore
26mWhats new with Data Storage?
12mEverything about storage on Android
