Lifecycle, LiveData, Viewmodels - The inner wiring
summary
Explains concrete internals: lifecycle owners are Activity, Fragment, Process (via a manifest provider) and Service; fragment view lifecycle is separate from fragment lifecycle; ProcessLifecycleOwner delays background events by 700 ms delay to avoid configuration-change noise. LiveData keeps a list of observers, emits on the main thread, offers MediatorLiveData for merging/transforms and a LiveDataReactiveStreams bridge to Rx. ViewModel survives config changes, calls onCleared cancels coroutines — use viewModelScope so launched coroutines are cancelled when the ViewModel is cleared.
AI-written summary · about
chapters (9)
- 0:00Intro
- 2:08Lifecycle
- 6:13Fragments
- 8:50Process Lifecycle
- 11:27Lifecycle Service
- 13:00Lifecycle Owner
- 14:20LiveData
- 17:30LiveData transformations
- 18:56LiveData overview
related talks
28mLifecycle, LiveData, ViewModels - The inner wiring
33mThe A,B and C of Lifecycle Components
41mViewModels, LiveData and Lifecycles, oh my!
28mInternals of Android Architecture Components
27mAndroid Components under the hood
25mHow to Survive the Lifecicle
41mLiveData beyond VIewModels
23mMaster of Lifecycle
