Package com.mapsindoors.mapssdk
Class MPMapsIndoorsLocationSource
- java.lang.Object
-
- com.mapsindoors.mapssdk.MPMapsIndoorsLocationSource
-
- All Implemented Interfaces:
MPLocationSource
- Direct Known Subclasses:
MPMapsIndoorsLiveLocationSource
public class MPMapsIndoorsLocationSource extends java.lang.Object implements MPLocationSource
MPMapsIndoorsLocationSource- Since:
- 3.0.0
-
-
Constructor Summary
Constructors Constructor Description MPMapsIndoorsLocationSource()
[Package-private].
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLocationsObserver(MPLocationsObserver observer)
void
clearCache()
Clears cached datajava.util.List<MPLocation>
getLocations()
Retrieves all locationsint
getSourceId()
A positive non-zero unique identifier for this location data sourceMPLocationSourceStatus
getStatus()
void
removeLocationsObserver(MPLocationsObserver observer)
void
setInternalOnStatusChangeListener(MPLocationSourceOnStatusChangedListener internalOnStatusChangeListener)
void
terminate()
Invoked by the MapsIndoors SDK whenMapsIndoors.onApplicationTerminate()
is calledvoid
updateLocations(java.util.List<MPLocation> updatedLocations)
-
-
-
Constructor Detail
-
MPMapsIndoorsLocationSource
public MPMapsIndoorsLocationSource()
[Package-private]. Note that to get our default location provider from outside of the SDK, one must useMapsIndoors.getMapsIndoorsLocationSource()
-
-
Method Detail
-
getLocations
@NonNull public java.util.List<MPLocation> getLocations()
Description copied from interface:MPLocationSource
Retrieves all locationsIt will return an empty list if data is not ready or not available. You can check the source status with
MPLocationSource.getStatus()
- Specified by:
getLocations
in interfaceMPLocationSource
- Returns:
- Since:
- 3.0.0
-
addLocationsObserver
public void addLocationsObserver(@Nullable MPLocationsObserver observer)
- Specified by:
addLocationsObserver
in interfaceMPLocationSource
- Parameters:
observer
-- Since:
- 3.0.0
-
removeLocationsObserver
public void removeLocationsObserver(@Nullable MPLocationsObserver observer)
- Specified by:
removeLocationsObserver
in interfaceMPLocationSource
- Parameters:
observer
-- Since:
- 3.0.0
-
getStatus
@NonNull public MPLocationSourceStatus getStatus()
- Specified by:
getStatus
in interfaceMPLocationSource
- Returns:
- Since:
- 3.0.0
-
getSourceId
public int getSourceId()
Description copied from interface:MPLocationSource
A positive non-zero unique identifier for this location data source- Specified by:
getSourceId
in interfaceMPLocationSource
- Returns:
- Since:
- 3.0.0
-
clearCache
public void clearCache()
Clears cached data- Specified by:
clearCache
in interfaceMPLocationSource
- Since:
- 3.1.3
-
terminate
public void terminate()
Description copied from interface:MPLocationSource
Invoked by the MapsIndoors SDK whenMapsIndoors.onApplicationTerminate()
is called- Specified by:
terminate
in interfaceMPLocationSource
- Since:
- 3.1.3
-
updateLocations
public void updateLocations(@Nullable java.util.List<MPLocation> updatedLocations)
- Parameters:
updatedLocations
-- Since:
- 3.2.0
-
setInternalOnStatusChangeListener
public void setInternalOnStatusChangeListener(MPLocationSourceOnStatusChangedListener internalOnStatusChangeListener)
-
-