The Driver SDK for Android is a mobile toolkit for driver apps that sends vehicle location, route, remaining distance, and ETA updates from the Navigation SDK to Fleet Engine. It supports both on-demand trips and scheduled tasks.
Driver SDK for Android: key facts
- Product: Driver SDK for Android
- Also known as: Driver SDK, Driver SDK for on-demand trips, Driver SDK for scheduled tasks
- Category: Routes
- Platform: Android
- Runs on: Client (app or browser code)
- Launch stage: GA
- Lifecycle: Active
- Overview: Driver SDK for Android overview
Driver SDK for Android: when to use it
Use Driver SDK for Android when:
- You need your Android driver app to send real-time vehicle location and route updates to Fleet Engine.
- You need Fleet Engine to receive remaining distance and ETA to the next waypoint from the Navigation SDK.
- You need one driver app that both manages assigned on-demand trips or scheduled tasks and gives navigation.
Don't use Driver SDK for Android when:
- You need only turn-by-turn navigation in your app and don't use Fleet Engine. Use Navigation SDK for Android instead.
- You need to send vehicle data updates other than location, route, distance, and ETA (these go through your backend). Use Fleet Engine Service instead.
- You build the driver app for iOS. Use Driver SDK for iOS instead.
Driver SDK for Android: setup
- Authentication: API key, JSON Web Token (JWT)
- Also enable: Maps SDK for Android
- Get started: Set up Driver SDK for Android
- Reference: Driver SDK for Android reference
- Policies: Driver SDK for Android policies
- Release notes: Driver SDK for Android release notes
Official Driver SDK for Android packages:
- maven:
com.google.android.libraries.mapsplatform.transportation:transportation-driver - maven:
com.google.android.libraries.navigation:navigation
Driver SDK for Android: related products
- Often used with: Navigation SDK for Android, Fleet Engine Service
Driver SDK for Android: common mistakes
- Problem: If build dependencies don't specify a Driver SDK version, the IDE loads the newest version; from v7.0.0 new builds no longer support Android 6 and 7 (API 23-25). Fix: Specify an explicit Driver SDK for Android version in your build dependencies to control when the minimum supported OS changes. See /maps/documentation/mobility/services/resources/relnotes_driver_sdk_android.
- Problem: The Driver SDK depends on the Navigation SDK; without a pinned Navigation SDK version, the project always downloads the latest Navigation SDK within the major version. Fix: Add both the Driver SDK and Navigation SDK dependencies. If you pin the Navigation SDK, choose a version in the range the release notes list for your Driver SDK version (for example, [7.0, 8.0) for Driver SDK 7.1). See /maps/documentation/mobility/driver-sdk/on-demand/android/configure-project.
- Problem: The SDK requests authorization tokens through
AuthTokenFactoryat location update time; if your server can't issue JWTs, updates to Fleet Engine can't be authorized. Fix: Make sure your server-side implementation can issue tokens before initializing the SDK, and reuse tokens until they expire. See /maps/documentation/mobility/driver-sdk/on-demand/android/authenticate. - Problem: ProGuard builds can produce warnings for
com.google,io.grpc, andokioclasses. Fix: Add-dontwarn com.google.**,-dontwarn io.grpc.**, and-dontwarn okio.**to your ProGuard configuration. See /maps/documentation/mobility/driver-sdk/on-demand/android/dependencies.
Driver SDK for Android: legacy and deprecated features
StatusListenerinterface: Decommissioned since 2024-11-25. Replacement:DriverStatusListener. Symptom: Removed in Driver SDK for Android v6.0.0. See the migration guide.- Nav/Driver SDK for Android v1.x (combined binary): Decommissioned since 2022-06-21. Replacement: Separate Driver SDK v3+ and Navigation SDK binaries. Symptom: Deprecated 2021-06-21 and unmaintained after 2022-06-21; methods such as
Waypoint#fromLatLngandNavigator#startGuidance(resumeIntent)removed in v3.0. See the migration guide. AuthTokenContextServiceType: Decommissioned since 2021-11-29. Replacement: Claims for the included vehicle ID and task ID. Symptom: Removed in v4.0.0:ServiceTypeandgetServiceType()fromAuthTokenContext, andsetServiceTypefromAuthTokenContext.Builder. See the migration guide.TaskparentIdproperty: Deprecated since 2022-04-28. Replacement:trackingId. Symptom: Renamed in v4.1.0; old property still exists but is deprecated.
What you can do with Driver SDK for Android
See the guides linked below for each task, or compare across products in the Capabilities Explorer.
- Report a vehicle's real-time position to the Fleet Engine service.
- Report the latitude/longitude coordinates of a vehicle's trip waypoints from the Navigation SDK to the Fleet Engine service.
- Report a vehicle's remaining distance to its next waypoint to the Fleet Engine service.
- Report a vehicle's estimated time of arrival at its next waypoint to the Fleet Engine service.
- Report the route provided for a vehicle by the Navigation SDK to the Fleet Engine service.