registerLifecycleObserver

open override fun registerLifecycleObserver(mapView: View, observer: MapboxLifecycleObserver)

Register a MapboxLifecycleObserver to observe life cycle events from LifecycleOwner.

Calling this again before cleanup replaces the previous registration instead of stacking a second one.

Parameters

mapView

the instance of mapView, will get the LifecycleOwner from mapview's parent

observer

the observer that listen to the life cycle events