addLocationObserver

abstract fun addLocationObserver(observer: LocationObserver)

Registers an observer in this instance of LocationProvider. One instance of LocationProvider can have more than one observer. It is expected that LocationProvider will not start until an observer is added. The observer registered will receive notifications on the same looper as the one where this method is invoked. If the looper is not available, this method can be called from any thread.

Parameters

observer

An observer to add.


abstract fun addLocationObserver(observer: LocationObserver, looper: Looper)

Registers an observer in this instance of the client. One instance of the client can have more than one observer. It is expected that the client will not start until an observer is added.

Parameters

observer

An observer to add.

looper

The Looper object whose message queue will be used to implement the callback mechanism.