public final class

FusedLocationSource

extends Object
implements LocationSource
java.lang.Object
   ↳ com.steerpath.sdk.location.FusedLocationSource

Class Overview

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.

Summary

[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

Public Constructors

public FusedLocationSource (Context context, LocationRequest req)

Create a new LocationSource with the settings given in LocationRequest.

Parameters
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.
Throws
UnauthorizedApiAccessRuntimeException in case of unauthorized api access

public FusedLocationSource (Context context)

Create a new location source with the default settings for LocationRequest.

Parameters
context The context in which this location request is used.

Public Methods

public void activate (LocationSource.OnLocationChangedListener listener)

Call this method to start receiving updates on the listener's onUpdate method.

Parameters
listener to receiver of location updates

public void deactivate ()

Call this method to stop receiving updates to the listener registered in activate().

public String toString ()