LifecycleKey
A ServiceKey that ties the lifetime of a service instance to one or more AndroidX LifecycleOwners.
The service is created lazily, similar to a LazyKey. However, when retrieving the service, a LifecycleOwner must be provided. The service instance is retained by the locator as long as at least one of the LifecycleOwners used to retrieve it is active (i.e., its state is at or above the specified PutParams.minimumState).
Once all associated LifecycleOwners become inactive (i.e., their state drops below the minimumState), the service instance is discarded. A new instance will be created on the next request with an active LifecycleOwner.
It is an error to request a value using a LifecycleOwner that is not in at least the minimumState.
Types
The ServiceEntry for a LifecycleKey.
Parameters required to register a LifecycleKey.