addLocationObserver

open override fun addLocationObserver(observer: LocationObserver)

Registers an observer in this instance of LocationProvider. One instance of LocationProvider can have more than one observer. If you add the same observer twice, it will only be invoked once.

Parameters

observer

an observer to add


open override fun addLocationObserver(observer: LocationObserver, looper: Looper)

Registers an observer that will be invoked on a specific looper in this instance of LocationProvider. One instance of LocationProvider can have more than one observer. If you add the same observer twice (even with different loopers or if the looper wasn't set), it will only be invoked once on the latest looper that was passed.

Parameters

observer

an observer to add

looper

the looper the observer will be invoked on