The New Modern Data Persistence on Android - Meet Jetpack Datastore
summary
Explains why Jetpack DataStore replaces SharedPreferences by showing working code that writes and reads a Task object using preferences DataStore, a protobuf-backed proto DataStore with a generated serializer, and Kotlin coroutines and Flow for reactive reads. Shows dependency and Gradle plugin needs, migration snippets from SharedPreferences, a note about an M1 protobuf generation bug, and when to use DataStore vs Room. Claims: type safety, transactional consistency, and better performance for small key‑value or structured config data; proto handles versioning/schema evolution.
AI-written summary · about
chapters (16)
- 0:00Introduction and speaker background
- 3:43What is data persistence?
- 4:27Why Jetpack DataStore?
- 7:14Preferences vs Proto DataStore
- 9:00Implementing Preferences DataStore
- 13:16Writing to DataStore
- 14:41Reading from DataStore
- 16:11Observing DataStore changes
- 17:14Implementing Proto DataStore
- 20:50Writing and reading Proto DataStore
- 22:19DataStore vs SharedPreferences
- 23:26When to use Preferences vs Proto
- 24:31DataStore vs Room Database
- 28:01Migrating from SharedPreferences
- 31:34Summary and resources
- 34:52Q&A session
related talks
25mThe New Modern Data Persistence on Android - Meet Jetpack Datastore
19mJetpack DataStore - protocol buffers storage solution
19mFirebase & Jetpack: Fits like a Glove
01h 13mAccelerating Android Development with Google Jetpack
43mSmarter data storage on Android
26mSafely Migrating to DataStore in Production
18mRescuing Old Code with JetPack
47mArchitecting your Android app with Jetpack
