~/talk

Sharing my preference for DataStore

Talkat droidcon Italy 2020 · 2020-11-27..11-28· [android]
slides:none on file

DataStore claims to replace SharedPreferences and actually demonstrates that with concrete code: it uses Kotlin coroutines and Flow, provides Preferences (key‑value) and Proto (protocol buffers) implementations, and shows reads as Flows and writes as suspend atomic edits that guarantee on‑disk consistency. The talk shows migration code (shared‑prefs → preferences is trivial, → proto requires custom mapping and a done flag), error handling via IOException, and that proto gives compile‑time type safety.

AI-written summary · about

  1. 0:00Start
  2. 1:32get the share preferences from the context
  3. 13:05implement a data migration
  4. 17:25use a user preference serializer
  5. 18:03set default values for our user preferences
~/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.