~/talk

No Worries! Handling Don’t keep activities in the Compose era

TalkinJapaneseat DroidKaigi 2023 · 2023-09-14..09-16· [android, frontend-architecture]
name:upon
links:none on file
slides:none on file

Shows how to handle Android low-memory activity kills in Jetpack Compose by recreating kills with Developer Options and applying concrete fixes: use rememberSaveable instead of volatile remember (demo shows it survives activity destruction), store UI state in ViewModel via SavedStateHandle, and pass IDs in navigation arguments to save bundle space. Notes a Navigation Compose bug (e.g., 2.7.0.01) and recommends keeping bundle payloads small (around 50 KB) or using Room/DataStore for larger or shared persistence.

AI-written summary · about

  1. 0:00Introduction
  2. 1:05Don’t keep activities
  3. 3:14Activity destruction low memory
  4. 7:53Need for Don’t keep activities
  5. 10:46UI state preservation basics
  6. 13:14SavedState API overview
  7. 17:09Remember Saverable implementation
  8. 21:06SavedState API history alternatives
  9. 22:35OS activity destruction cases
  10. 24:22Config changes handling
  11. 25:04Low memory SavedState
  12. 25:47SavedState vs storage
  13. 30:50Nested UI state structure
  14. 33:21Bundle limits navigation
  15. 35:50Screen transition results
  16. 38:19Summary best practices
~/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.