addCallback

Add a new callback.

Parameters

owner

a LifecycleOwner that a given callback is bound to. Callback is called only if lifecycle is at least Lifecycle.State.STARTED, and removed when lifecycle goes to the Lifecycle.State.DESTROYED state.


Add a callback that does not change.

Parameters

owner

a LifecycleOwner that a given callback is bound to. Callback is called only if lifecycle is at least Lifecycle.State.STARTED, and removed when lifecycle goes to the Lifecycle.State.DESTROYED state.