~/talk

DataStore Preferences and migrating from SharedPreferences

Talkat droidcon APAC 2020 · 2020-12-14..12-15· [android]
links:none on file
slides:none on file

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

  1. 0:00Introduction to DataStore
  2. 1:09What is Jetpack DataStore
  3. 7:09Setting up Preference DataStore
  4. 13:08Understanding Protocol Buffers
  5. 17:06Setting up Proto DataStore
  6. 20:59Migrating from SharedPreferences
  7. 23:29Using DataStore in production
  8. 25:00Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.