ContextAware class is associated with a
Context sometime after the class is instantiated. By adding a
OnContextAvailableListener, you can receive a callback for that event.
ContextAware are strongly recommended to also implement
androidx.lifecycle.LifecycleOwner for providing a more general purpose API for listening for creation and destruction events.
abstract fun addOnContextAvailableListener(@NonNull listener: OnContextAvailableListener): Unit
Add a new
OnContextAvailableListener for receiving a callback for when this class is associated with a
Listeners are triggered in the order they are added when added before the Context is available. Listeners added after the context has been made available will have the Context synchronously delivered to them as part of this call.