I am using `ProcessLifecycleOwner` and I am adding...
# androidx
r
I am using
ProcessLifecycleOwner
and I am adding observer like this
Copy code
LifecycleRegistry.createUnsafe(ProcessLifecycleOwner.get()).addObserver(onProcessLifeCycleResume)
and here is my observer
Copy code
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?