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 ProcessLifecycle
ProcessLifecycle
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.
DefaultLifecycleObserver