Skip to content Skip to sidebar Skip to footer

How To Catch Lifecycle Events With Processlifecycleowner?

I am trying to (at least partially) determine when an application gets closed by the user to release some connections, etc. To do this, I am using the ProcessLifecycleOwner with my

Solution 1:

You need the corresponding annotation processor to pay attention to those annotations:

annotationProcessor 'android.arch.lifecycle:compiler:1.1.1'

Or, enable Java 8 support, and switch to DefaultLifecycleObserver.

Post a Comment for "How To Catch Lifecycle Events With Processlifecycleowner?"