androidx.lifecycle:lifecycle-service

Official Description: Android Lifecycle Service

CommonsWare’s Notes

This artifact provides LifecycleService, a Service implementation that dispatches lifecycle events and is a LifecycleOwner. If you wish to use LiveData from an ordinary Service, switching to LifecycleService as a base class will let you designate your service as the LifecycleOwner to use when registering LiveData observers.

On the other hand, since this is a class, not an interface, this will not work for any services that require another base class, such as JobIntentService or TileService.

Documentation

Versions