Further reading
In this chapter, we briefly covered how to create a lifecycle-aware component by making our CustomCountdown
component aware of the lifecycle events that MainActivity
exhibits. However, when needed, we can also tap into the lifecycle states of LifecycleOwner
. To understand how you can do that, check out the official docs for an example: https://developer.android.com/topic/libraries/architecture/lifecycle#lco.