hello. i want to add an observer to the fragment j...
# android
m
hello. i want to add an observer to the fragment just after activity goes to pause state, so in the next onResume of the fragment i do some action.
Copy code
viewLifecycleOwner.lifecycle.addObserver(object : LifecycleEventObserver {
checking for ON_RESUME does not work, because when the activity is paused, i receive the full lifecycle for the fragment