Slide 13
Slide 13 text
WHAT DOES AN ABSTRACT LOOK LIKE?
When ViewModels Go to Die: Saving ViewModel State
Sumayyah Ahmed, Android Engineer, Comcast
Contrary to our hopes, ViewModel lifecycles are not infallible. The Android OS can
kill running processes, which means killing your ViewModel and all the state that
you’ve saved in it, spelling impending disaster for your Activity or Fragment. Luckily,
we have a new tool to maintain a seamless user experience even through process
death – SavedStateHandle.
This talk will use code examples to demonstrate:
• How to use SavedStateHandle to gracefully save and resurrect your ViewModel
state through process death
• How to leverage Jetpack to automate state restoration with SavingStateLiveData