Provides access to a list of listeners with active Android Lifecycle owners from LifecycleAwareListeners.

Lifecycle owners are considered active only when their state is Lifecycle.State.STARTED or Lifecycle.State.RESUMED.


Link copied to clipboard


Link copied to clipboard
open override val activeListeners: Sequence<T>

The registered listeners that are in an active state and are thus ready to handle callbacks.

Inherited properties

Link copied to clipboard

true when at least one of the registered listeners is active; false otherwise.


Inherited functions

Link copied to clipboard
fun addListener(lifecycleOwner: LifecycleOwner, listener: T)

Add a listener that will receive events when its LifecycleOwner is active.

Link copied to clipboard
fun addListenerForever(listener: T)

Add a listener that will always receive events.

Link copied to clipboard
fun removeListener(listener: T)

Remove listener.

Link copied to clipboard

Remove all listeners registered with a lifecycle owner.