~/talk

Master of Lifecycle

TalkinJapaneseat DroidKaigi 2021 · 2021-10-19..10-21· [android, software-architecture]
name:Sato Shun
links:none on file
slides:none on file

Explains Android lifecycle issues that cause battery and memory waste—e.g., a long‑lived Activity retaining a short‑lived Fragment or coroutines not being cancelled—and shows fixes validated with Memory Profiler showing retained Activity instances. Covers using ViewModel with SavedStateHandle for rotation/process survival, LiveData builder cancellation behavior, and making Kotlin Flow behave like LiveData via stateIn + flowWithLifecycle or using repeatOnLifecycle / launchWhenStarted to stop background work.

AI-written summary · about

  1. 0:00Lifecycle importance
  2. 2:08Understand lifecycle
  3. 5:42Prevent memory leaks
  4. 10:56Activity lifecycle
  5. 15:10ViewModel and LiveData for UI
  6. 18:49Flow vs LiveData behavior
  7. 21:18LiveData vs Flow usage
  8. 22:23Resource efficiency
~/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.