Page Summary
-
DriverContextprovides dependencies for creating aDriverApiinstance, essential for interacting with the Driver SDK. -
It offers access to key components like application context, authentication token factory, navigation tools, and provider/vehicle identifiers.
-
Developers can utilize the
DriverContext.Builderto construct and customizeDriverContextinstances according to their specific needs. -
A
DriverStatusListenercan be attached to receive updates and potential error logs related to the driver's status. -
Methods like
getRoadSnappedLocationProviderandgetNavigatorenable access to advanced location and navigation features within the SDK.
DriverContext provides the dependencies needed to construct a DriverApi instance.
Nested Class Summary
| class | DriverContext.Builder | Builder for DriverContext. | |
| interface | DriverContext.DriverStatusListener | Listener for status updates with the capability of getting the cause of an error log. | |
Public Constructor Summary
Public Method Summary
| static DriverContext.Builder | |
| abstract Application |
getApplication()
Returns the application context.
|
| abstract AuthTokenContext.AuthTokenFactory |
getAuthTokenFactory()
Returns the factory for generating JWT for the given call context.
|
| abstract DriverContext.DriverStatusListener |
getDriverStatusListener()
Returns the optional listener for status updates with the capability of
received the cause of error logs.
|
| String |
getFleetEngineServiceAddress()
Returns the FleetEngine service address defined in the Android Manifest or
falls back to the default value.
|
| abstract Navigator |
getNavigator()
Returns the initialized Navigator singleton.
|
| abstract String |
getProviderId()
Returns the unique identifier for this provider.
|
| abstract RoadSnappedLocationProvider |
getRoadSnappedLocationProvider()
Returns the RoadSnappedLocationProvider from the NavigationApi.
|
| abstract String |
getVehicleId()
Returns the unique identifier for this vehicle for this provider.
|
| abstract DriverContext.Builder |
toBuilder()
Returns new Builder instance set with current DriverContext state.
|
Inherited Method Summary
Public Constructors
public DriverContext ()
Public Methods
public static DriverContext.Builder builder (Application application)
Returns new default Builder instance.
public abstract Application getApplication ()
Returns the application context.
public abstract AuthTokenContext.AuthTokenFactory getAuthTokenFactory ()
Returns the factory for generating JWT for the given call context.
public abstract DriverContext.DriverStatusListener getDriverStatusListener ()
Returns the optional listener for status updates with the capability of received the cause of error logs.
public String getFleetEngineServiceAddress ()
Returns the FleetEngine service address defined in the Android Manifest or falls back to the default value.
public abstract Navigator getNavigator ()
Returns the initialized Navigator singleton.
public abstract String getProviderId ()
Returns the unique identifier for this provider.
public abstract RoadSnappedLocationProvider getRoadSnappedLocationProvider ()
Returns the RoadSnappedLocationProvider from the NavigationApi.
public abstract String getVehicleId ()
Returns the unique identifier for this vehicle for this provider.
public abstract DriverContext.Builder toBuilder ()
Returns new Builder instance set with current DriverContext state.