LiveData is an observable data class, and it can perceive the life cycle of Activity, Fragment, and Service to ensure that LiveData only updates component observers in the active life cycle state.
1. Friendly Reminder
Jetpack component composition diagram
Jetpack component series Previous article