~/talk

The Life and Death of an Android Activity

Talkat Devoxx US 2017 · 2017-03-21..03-23· [android]
slides:none on file

A simple ticker app loses its count on rotation and when entering multi-window because Android treats those as runtime configuration changes and destroys then recreates the Activity, resetting the count from 0 even if it was 3; the fix is to persist transient UI with onsaveInstanceState (Bundle in onCreate). Backgrounded apps can also be killed by the Viking killer (process kill), so saved state still matters. Video pausing is solved by moving playback start/stop to onStart/onStop instead of onPause/onResume.

AI-written summary · about

  1. 0:00Start
  2. 2:39The Android Activity Lifecycle
  3. 3:38Resource File
  4. 4:10The Activity Manager
  5. 4:33Activity Manager
  6. 5:33The Foreground Activity
  7. 5:48The Activity Lifecycle
  8. 6:55Stopped
  9. 8:35Build-Up Scenario
  10. 9:59Tearing Down the Activity
  11. 14:57Launching a Transparent Activity
  12. 17:10Visible Lifetime
  13. 17:30Foreground Lifetime
  14. 19:30Runtime Configuration Change
  15. 21:01Unsaved Instance State
  16. 26:25Multi Window Mode
  17. 31:27Life Cycle Pairs
~/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.