~/talk

DataStore Preferences and migrating from SharedPreferences

Talkat droidcon Americas 2020 · 2020-11-16..11-17· [android, databases]
links:none on file
slides:none on file

Explains migrating heavy SharedPreferences usage to Jetpack DataStore with concrete code: a app launch counter demo shows Preference DataStore using coroutines, Flow and Dispatchers.IO to read/write without blocking UI; a typed Proto DataStore example stores UI filters via a proto serializer and protobuf schema; migration uses SharedPreferencesMigration that runs once, maps old keys to proto fields, and deletes legacy files after success; demos show values persist and reads emit correctly.

AI-written summary · about

  1. 0:00Introduction to DataStore
  2. 1:45Why DataStore is needed
  3. 7:29Setting up Preference DataStore
  4. 13:35Proto DataStore overview
  5. 15:43Protocol Buffers basics
  6. 24:14Migrating from SharedPreferences
  7. 30:31Q&A session
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.