Consumer SDK for Android quick reference

The Consumer SDK for Android is part of Fleet Engine for on-demand trips. It provides interfaces that model trip data and follow trips in Fleet Engine, and classes to build a map-based display that shares a trip's progress (vehicle location, route, ETA, remaining distance, traffic) with consumers in an Android app.

Consumer SDK for Android: key facts

  • Product: Consumer SDK for Android
  • Also known as: Android Consumer SDK, Consumer SDK, Mobility Services On-demand Trips Android Consumer SDK
  • Category: Routes
  • Platform: Android
  • Runs on: Client (app or browser code)
  • Launch stage: GA
  • Lifecycle: Active
  • Overview: Consumer SDK for Android overview

Consumer SDK for Android: when to use it

Use Consumer SDK for Android when:

  • You need consumers in your Android app to follow an on-demand trip (ride, order, or delivery) that your backend tracks in Fleet Engine.
  • You need to show a vehicle's near real-time, road-snapped location and route on a map in an Android consumer app.
  • You need to show pickup and drop-off ETA, remaining distance, and live traffic for a Fleet Engine trip in Android.
  • You need to customize trip markers, route polylines, or map styling for a journey-sharing map in Android.

Don't use Consumer SDK for Android when:

  • You need journey sharing for on-demand trips in an iOS app. Use Consumer SDK for iOS instead.
  • You need journey sharing in a web page, or consumer tracking of scheduled tasks such as shipments. Use JavaScript Consumer SDK instead.
  • You need to report driver location and trip progress from the driver's Android app. Use Driver SDK for Android instead.

Consumer SDK for Android: setup

Official Consumer SDK for Android packages:

  • maven: com.google.android.libraries.mapsplatform.transportation:transportation-consumer

Consumer SDK for Android: common mistakes

Consumer SDK for Android: legacy and deprecated features

  • ConsumerTrip, ConsumerTripCallback, ConsumerTripManager, ConsumerTripOptions: Decommissioned since 2023-09-15. Replacement: TripModel, TripModelCallback, TripModelManager, TripModelOptions. See the migration guide.
  • Trip class and Trip.TripStatus / Trip.TripType annotations (and TripInfo#getTripStatus(), TripInfo#getTripType(), TripModelCallback#onTripStatusUpdated): Deprecated since 2023-09-15. Replacement: TripInfo.TripStatus / TripInfo.TripType, TripInfo#getCurrentTripStatus(), TripInfo#getCurrentTripType(), TripModelCallback#onTripStatusUpdate. See the migration guide.
  • MarkerStyleOptions and PolylineStyleOptions: Decommissioned since 2021-11-30. Replacement: MarkerOptions and PolylineOptions (shared with the Maps SDK). Symptom: Consumer SDK applies its own default style per marker or polyline type, not MarkerOptions defaults. See the migration guide.
  • Private repository distribution channel: Deprecated. Replacement: Google Maven repository (versions 2.1.0 and later). See the migration guide.

What you can do with Consumer SDK for Android

See the guides linked below for each task, or compare across products in the Capabilities Explorer.