I need to observe a LiveData object from a data class. I have observed these two methods are working:
Method 1: Convert the class to a LifecycleOwner
LifecycleOwner