Class PositionManager


  • public final class PositionManager
    extends java.lang.Object
    • Constructor Detail

      • PositionManager

        public PositionManager​(geolife.android.navigationsystem.NavigationSystem navigationSystem)
    • Method Detail

      • removePositionListener

        public void removePositionListener​(PositionManager.PositionListener listener)
        Removes the specified listener from the list.
        Parameters:
        listener - The listener.
      • getLastKnownPosition

        @Nullable
        public android.location.Location getLastKnownPosition()
        Returns:
        Last known position or null.
      • getCurrentPosition

        @Nullable
        public Position getCurrentPosition()
        Returns:
        Current position or null.
      • setCurrentPosition

        public void setCurrentPosition​(android.location.Location location)
        Sets the current position.

        You can use this method to provide the SDK with positions instead of using startPositionUpdates().

      • getExtrapolatedPosition

        @Nullable
        public MapCoordinates getExtrapolatedPosition()
        Returns:
        Current extrapolated position or null.
      • getGpsStatus

        public GpsStatus getGpsStatus()
      • isGpsExtrapolationEnabled

        public boolean isGpsExtrapolationEnabled()
        Returns:
        true if the extrapolation is enabled, false otherwise.
        See Also:
        setGpsExtrapolationEnabled(boolean)
      • setGpsExtrapolationEnabled

        public void setGpsExtrapolationEnabled​(boolean gpsExtrapolationEnabled)
        Enables/disables extrapolation of GPS position. If the extrapolation is enabled, the position cursor moves smoothly between consecutive GPS positions. If it is disabled, the cursor will jump to new positions.
        Parameters:
        gpsExtrapolationEnabled - true if the extrapolation is enabled, false otherwise.
      • startPositionUpdates

        public void startPositionUpdates()
        Starts receiving position updates.
      • stopPositionUpdates

        public void stopPositionUpdates()
        Stops receiving position updates.