Remon Shehata
03/21/2021, 7:47 PMProcessLifecycleOwner
and I am adding observer like this
LifecycleRegistry.createUnsafe(ProcessLifecycleOwner.get()).addObserver(onProcessLifeCycleResume)
and here is my observer
class OnProcessLifeCycleResume(private val doInOnResume: () -> Unit) : LifecycleObserver {
private val TAG = "LifeCycleDemo"
@OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
fun onMoveToForeground() {
val handler = Handler(Looper.getMainLooper())
Log.d(TAG, "onMoveToForeground: ")
doInOnResume()
}
}
but it's never triggered. any idea why?