NavigationVehicleReporter

public abstract class NavigationVehicleReporter extends Object
Known Direct Subclasses

Base class for a vehicle reporter that supports reporting of location updates. An app is allowed only one vehicle reporter.

Public Method Summary

void
disableLocationTracking()
Stops location tracking.
void
enableLocationTracking()
Start uploading position reports to the Fleet Engine backend.
long
getLocationReportingIntervalMillis()
Returns the current location reporting interval, in milliseconds.
boolean
isLocationTrackingEnabled()
Returns whether location tracking is enabled.
void
setLocationReportingInterval(long interval, TimeUnit intervalUnits)
Sets the minimum interval at which location reports will be delivered to the Fleet Engine backend.
void
setSupplementalLocation(Location location)
Sets supplementary location information which FleetEngine will use when it deems it more accurate or current than the road-snapped locations generated internally by the Driver SDK.

Inherited Method Summary

Public Methods

public void disableLocationTracking ()

Stops location tracking. No attempt is made to stop a report that is already in progress, but no new position reports will be generated or transmitted.

Tracking can be resumed after stopping by calling enableLocationTracking() again.

Throws
IllegalStateException if location tracking was already stopped

public void enableLocationTracking ()

Start uploading position reports to the Fleet Engine backend. Reports are made periodically, by default every 10 seconds. Reports may be made less frequently if transient issues, such as loss of network connectivity, prevent report delivery.

Position reports are made in a background thread, this call returns immediately.

Location tracking may be disabled by calling disableLocationTracking().

Reporting interval can be changed with setLocationReportingInterval(long, TimeUnit).

Throws
IllegalStateException if location tracking was already enabled

public long getLocationReportingIntervalMillis ()

Returns the current location reporting interval, in milliseconds.

public boolean isLocationTrackingEnabled ()

Returns whether location tracking is enabled.

public void setLocationReportingInterval (long interval, TimeUnit intervalUnits)

Sets the minimum interval at which location reports will be delivered to the Fleet Engine backend.

Reporting is reset whenever this method is called, unless the given interval is equivalent to the existing one, in which case this call is ignored. You should typically call this method much less often than the requested reporting frequencies.

Parameters
interval time scalar for the desired reporting interval.
intervalUnits units of measure for the interval parameter.

public void setSupplementalLocation (Location location)

Sets supplementary location information which FleetEngine will use when it deems it more accurate or current than the road-snapped locations generated internally by the Driver SDK.