| java.lang.Object | |
| ↳ | com.steerpath.sdk.location.FusedLocationSource |
The FusedLocationSource is an easy to use API for receiving location. It automatically combines
(fuses) location updates from different sources such as Steerpath indoor positioning, GPS and
network to give the most accurate and most up to date position estimate possible.
Usage is extremely simple, you simply create an instance of this class and call activate
with a OnLocationChangedListener to receive updates. Once updates are no longer needed,
deactivate can be called.
If more control is required, FusedLocationProviderApi can be used instead.
|
[Expand]
Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.steerpath.sdk.location.LocationSource
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
FusedLocationSource(Context context, LocationRequest req)
Create a new LocationSource with the settings given in LocationRequest.
| |||||||||||
|
FusedLocationSource(Context context)
Create a new location source with the default settings for LocationRequest.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void |
activate(LocationSource.OnLocationChangedListener listener)
Call this method to start receiving updates on the listener's onUpdate method.
| ||||||||||
| void |
deactivate()
Call this method to stop receiving updates to the listener registered in activate().
| ||||||||||
| String | toString() | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.steerpath.sdk.location.LocationSource
| |||||||||||
Create a new LocationSource with the settings given in LocationRequest.
| context | The context in which this location request is used. |
|---|---|
| req | specification of how the location should be obtained and how often updates should come. |
| UnauthorizedApiAccessRuntimeException | in case of unauthorized api access |
|---|
Create a new location source with the default settings for LocationRequest.
| context | The context in which this location request is used. |
|---|
Call this method to start receiving updates on the listener's onUpdate method.
| listener | to receiver of location updates |
|---|
Call this method to stop receiving updates to the listener registered in activate().