| com.steerpath.sdk.location.LocationSource |
Known Indirect Subclasses
|
A location source provides location updates to a listener through the
LocationSource.OnLocationChangedListener object's onUpdate method.
Inspired by Google Play Service's similar interface.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| interface | LocationSource.OnLocationChangedListener | OnLocationChangedListener is used for receiving updates when a location changes. | |||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| public static final LocationSource | NullLocationSource | The NullLocationSource is a location source which will never provide a location. | |||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| abstract void |
activate(LocationSource.OnLocationChangedListener listener)
Call this method to start receiving updates on the listener's onLocationChanged() method.
| ||||||||||
| abstract void |
deactivate()
This method stops the location source and no more calls to the onLocationChanged() method
provided in activate will be called.
| ||||||||||
The NullLocationSource is a location source which will never provide a location. It is useful for example to be provided to SteerpathMap if you want to manually call updateLocation instead of using a location source.
Call this method to start receiving updates on the listener's onLocationChanged() method.
This method stops the location source and no more calls to the onLocationChanged() method provided in activate will be called. Internally, implementations should discard all resources when deactivate is called.