On-demand Rides and Deliveries Solution is currently available only to select partners. Contact sales to learn more.

Consumer SDK for Android Release Notes

Stay organized with collections Save and categorize content based on your preferences.

This section contains release notes for the Consumer SDK for Android.

1.2.0 (November 21, 2022)

Bug fixes

  • Fix bug that caused empty traffic to be reported in the onTripActiveRouteTrafficUpdated callback.

New features

  • "Traffic-aware polylines" is now generally available.

1.1.2 (October 27, 2022)

Bug fixes

  • Addresses bug that cause the route polyline to disappear after a JourneySharingSession is started more than once for a TripModel.

Announcement: Freezing support for Android 5 (July 25, 2022)

For our v1.1.1 SDK version, we are providing an additional year of support for apps running on Android 5, for both API levels 21 and 22.

What this means:

  • Consumer SDK running on your Android apps will support a minimum Android 5 (API level 21) until June 30, 2023.

  • After June 30, 2023, we will support only Android API levels 23 and above. In other words, we will stop supporting Android API levels 21 and 22 across all SDK versions after that date. This means that bugs related to Android 21 or 22 in any SDK version (including 4.x) will not be fixed, and we do not guarantee that the SDKs will behave correctly.

v1.1.1 (July 25, 2022)

Dependency change

  • Downgrades the minimum supported Android API level to 21.

v1.1.0 (April 28, 2022)

  • Internal improvements.

v1.0.19 (March 17, 2022)

Bug fixes

  • Fixed a memory leak in the ConsumerApi class.

v1.0.14 (November 30, 2021)

The minimum supported Android API level is now 23.

API changes

  • Changes to the ConsumerTrip and ConsumerTripManager classes.

    • Cleaned up some method names to make their meaning clearer, and to align with the iOS platform.
  • Changes to ConsumerTripCallback, ConsumerTrip and TripInfo.

    • Changed some class names to form parity with iOS. Introduced TripModel, TirpModelManager, and TripModelOptions to deprecate ConsumerTrip, ConsumerTripManager and ConsumerTripOptions.

    • Cleaned up some method names. Revised or added JavaDoc comments to methods to convey clearer meanings.

    • Improved error handling.

Styling customization

  • Deprecated legacy wrappers

    • MarkerStyleOptions and PolylineStyleOptions were deprecated and replaced by MarkerOptions and PolylineOptions, which are both shared with the Maps SDK.

Crash monitoring

  • Added crash detection and logging.

    • An addition was made to allow you to opt out of this functionality. This was done as a part of a larger Geo-wide effort for crash monitoring.

Authentication changes

  • Remove unnecessary methods from the Authentication interfaces.
    • Removed the ServiceType parameter.

v0.9.28 (May 18, 2021)

API changes

  • Updated all ConsumerTripCallback methods to use TripInfo as the parameter.
  • Added ConsumerTrip.isRefreshing(), which indicates whether ConsumerTrip is actively updating itself with fresh trip information from Fleet Engine.
  • Added ConsumerTripCallback.onTripRemainingRouteDistanceUpdated().
  • Added ConsumerTripCallback.onTripRemainingRouteUpdated().
  • Replace Guava return types (ImmutableSet, ImmutableList) with java.util equivalent classes.
  • Package name changes:
    • com.google.android.libraries.ridesharing.common.AuthTokenContext -> com.google.android.libraries.ridesharing.consumer.auth.AuthTokenContext
    • com.google.android.libraries.ridesharing.common.AuthTokenFactory -> com.google.android.libraries.ridesharing.consumer.auth.AuthTokenFactory
    • com.google.android.libraries.ridesharing.common.FleetEngineServiceType -> com.google.android.libraries.ridesharing.consumer.auth.FleetEngineServiceType
    • com.google.android.libraries.ridesharing.common.model.Trip -> com.google.android.libraries.ridesharing.consumer.model.Trip
    • com.google.android.libraries.ridesharing.common.model.Vehicle -> com.google.android.libraries.ridesharing.consumer.model.Vehicle

Implementation changes

  • Fixed a race condition where the SDK could crash from interactions with the map before it is ready.
  • The SDK no longer contains an unobfuscated copy of io.grpc.
  • Fixed a bug with flickering traffic polylines on certain devices. Traffic segments will now have rounded ends.

v0.9.15 (October 7, 2020)

API changes

  • This release introduces Traffic Aware Polylines.
    • Added TripInfo.getActiveRouteTraffic() and TripInfo.getRemainingRouteTraffic().
    • Added ConsumerTripCallback.onTripActiveRouteTrafficUpdated() and ConsumerTripCallback.onTripRemainingRouteTrafficUpdated() to indicate when traffic has changed.
    • Added PolylineStyleOptions for traffic customization (setTrafficEnabled(), setTrafficColorNoData(), setTrafficColorNormal(), setTrafficColorSlow(), setTrafficColorTrafficJam()).
    • Exposed PolylineStyleOptions.TRAFFIC_Z_INDEX_ADDITION.
    • Added TripWaypoint.getTrafficData().
    • Added TrafficData data type.
    • Added ConsumerController.hideAllSessions(). ConsumerController.showSession() no longer accepts null as an argument.

v0.9.9 (July 15, 2020)

API changes

  • This is a major change that introduces a modularized architecture with a clearer relationship between the data-only layer (for example, ConsumerTripManager) and the user interface layer (for example, JourneySharingSession). For information on migrating to the new architecture, see the Modularization Migration Guide.
    • The ConsumerTrip object is now obtained from ConsumerTripManager.getTrip().
    • ConsumerTrip.unregisterCallback has been renamed to ConsumerTrip.unregisterTripCallback.
    • ConsumerTrip.isCallbackRegistered has been renamed to ConsumerTrip.isTripCallbackRegistered.
    • Added ConsumerTrip.setConsumerTripOptions() and ConsumerTrip.getConsumerTripOptions().
    • Removed ConsumerTrip.setAutoRefreshInterval().
  • Removed non-journey sharing APIs.
    • Removed vehicle density map.
    • Removed trip preview state.
    • Removed pickup selection state.
    • Removed dropoff selection state.
    • Removed the following marker types: SELECTED_PICKUP_POINT, SUGGESTED_PICKUP_POINT, HIGHLIGHTED_PICKUP_POINT, and SELECTED_DROPOFF_POINT.
  • Changed OnConsumerMarkerClickCallback and ConsumerMapReadyCallback from interfaces to abstract classes.
  • Added ConsumerController.getCameraUpdate(), ConsumerController.isAutoCameraEnabled(), and ConsumerController.enableAutoCamera().
  • Removed the custom FAB and its associated methods (ConsumerController.isMyLocationFabEnabled and ConsumerController.setMyLocationFabEnabled).

Implementation changes

  • A ConsumerTripCallback, whether registered with or without a LifecycleOwner, no longer automatically unregisters on TripStatus.COMPLETE or TripStatus.CANCELED.
  • AutoCamera is now enabled by default and never reenables or disables itself. Previously, AutoCamera automatically reenabled on TripStatus.ARRIVED_AT_PICKUP and disabled itself when the user interacted with the map during journey sharing.
  • The following improvements have been made to journey sharing vehicle animation:
    • Journey sharing animation now handles the situation where a vehicle may legitimately travel back along an already-traversed route.
    • The vehicle will now straight-line animate instead of route interpolating between points when it is determined algorithmically to be appropriate.
  • FINE_LOCATION permissions are no longer required.

Other changes

  • Updated the following dependency versions:
    • com.google.android.datatransport:transport-api:2.2.0
    • com.google.android.datatransport:transport-backend-cct:2.2.0
    • com.google.android.datatransport:transport-runtime:2.2.0

v0.9.1 (March 23, 2020)

API changes

  • Added TripInfo.getVehicleId(), TripInfo.getNumberOfPassengers(), TripInfo.getIntermediateDestinationIndex(), TripInfo.getTripActiveRoute(), and TripInfo.getTripRemainingRoute().
  • Added options class used during ConsumerApi initialization that lets the FleetEngine address to be dynamically set. If the API is not called with a FleetEngine value, it attempts to fetch it from the Android manifest or else falls back to the default value.

Improvements

  • The route polyline is not displayed when the trip status is ARRIVED_AT_PICKUP.
  • Off-route vehicle tracking has been improved (requires DriverSDK 1.15):
    • Vehicle tracking does not snap the vehicle to the route when the vehicle drives past the pickup point.
    • Vehicle tracking enables displaying the vehicle off the road; for example, in unmapped parking lots.
  • The vehicle icon now updates when the driver’s destination does not match the destination in Fleet Engine.

v0.8.6 (December 16, 2019)

API changes

  • Added TripInfo.getVehicleLocation().

  • ConsumerMapView is no longer final.

Implementation changes

  • The active leg remaining distance is now calculated using server distance (driver reported + static route where applicable) instead of local snapping. This change produces more accurate remaining distance values.

Other changes

  • New dependencies required. See the .pom file for details.

    • com.google.android.datatransport:transport-api:2.0.0
    • com.google.android.datatransport:transport-backend-cct:2.0.2
    • com.google.android.datatransport:transport-runtime:2.0.0
  • Added logs for trip request latency.

  • Added logs for trip response errors.

Notes

  • Since version 0.8.1, the Consumer SDK for Android ships as a jetified zip archive. For information about how to de-jetify it, see Jetifier: Reverse mode.

v0.8.1 (September 13, 2019)

New features

API changes

  • Added ConsumerController.disableAutoCamera() as the opposite function to centerMapForState().

  • VehicleLocation.getUpdateTime() now returns a Long that represents the timestamp (in milliseconds).

  • Simplified the AuthTokenFactory interface to expose a single method for token generation. Changed AuthTokenFactory from an interface to an abstract class to enable backwards compatibility in Java7. This change is backward compatible, but the old methods for single service token generation are deprecated, and will eventually be removed.

Implementation changes

  • Assets now centered to icon center, eliminating shadow offset.

  • setState to JOURNEY_SHARING onStartTripMonitoring() instead of waiting for monitored Trip's status.

  • Always returns data for first trip data update, even when trip data is out of sync.

  • Added Android Map Utils as a provided dependency.

Bug fixes

  • Fixed broken proguard export syntax for grpc keep.

v0.7.0 (August 7, 2019)

New features

  • Multidestination support for Journey Sharing.

API changes

  • New methods for ConsumerTripCallback.

    • onTripIntermediateDestinationsUpdated().
    • onTripETAToNextTripWaypointUpdated().
  • New ConsumerController methods.

    • getIntermediateDestinations().
    • setIntermediateDestinations(List<TerminalLocation> intermediateDestinations).
  • New TripStatuses.

    • TripStatus.ENROUTE_TO_INTERMEDIATE_DESTINATION.
    • TripStatus.ARRIVED_AT_INTERMEDIATE_DESTINATION.
  • New TripWaypoint getters.

    • getETAMillis().
    • getDistanceMeters().
  • Added the TripInfo class.

    • You can obtain TripInfo for the active trip with ConsumerTripManager.getActiveTripInfo().
  • Added WaypointType.INTERMEDIATE_DESTINATION.

  • Added MarkerType.TRIP_INTERMEDIATE_DESTINATION.

  • Created ConsumerMapState.JOURNEY_SHARING from merged ConsumerMapStates ENROUTE_TO_PICKUP, ARRIVED_AT_PICKUP, ENROUTE_TO_DROPOFF, and COMPLETE.

    • StateChangeCallbacks updated.

    • Added onStateJourneySharing().

    • Removed onStateWaitingForPickup(), onStateDriverArrived(), onStateEnroute(), and onStateEndofTrip().

Bug fixes

  • Fixed a bug where route is not trimmed to the vehicle location when trip monitoring starts in the middle of an active trip (not at head of route).

  • Fixed a bug where trip callbacks are not invoked for listeners registered on the Tripmanager after the TripManager has already fetched trip data.

  • Camera zoom now includes only the active route and the next trip waypoint (waypoint that belongs to the trip). Even if the remaining leg is visible, the zoom will never include it. Previously, the drop-off point was included in the zoom when the vehicle was either enroute to pickup, or arrived at pickup. This is no longer true.

Improvements

  • Populate the zeroth remaining waypoint with Driver data (remaining waypoint list is returned from ConsumerTripCallback.onTripRemainingWaypointsUpdated and TripInfo.getRemainingWaypoints().

  • Update all remaining waypoint ETAs when the ETA to the first waypoint in the list changes.

  • Force re-enable autocamera only when driver arrives at pickup. Previously, autocamera would reset to enabled for every trip state change. Autocamera is still enabled by default. Autocamera will not re-enable if a new active trip is set without a fresh call to startTripMonitoring().

v0.6.1 (June 26, 2019)

New features

  • Carpool support for journey sharing.

API changes

  • ConsumerController.getConsumerMapStyle() now returns ConsumerMapStyle rather than Task<ConsumerMapStyle>.

  • Added PolylineStyle.setZIndex().

Bug fixes

  • Route animation now happens only when the route segment is in sync, resulting in an improved user experience.

  • Fixed vehicle "flickering" during animation interpolation when driver location updates are close together.

  • Fixed a bug where the vehicle starts at the head of the route instead of at its most updated location when trip monitoring starts in the middle of an active trip.

  • Display the active route polyline above the remaining route when they overlap.

Improvements

  • Now expose the gRPC Status class with unobfuscated methods.

v0.5.1.01 (May 17, 2019)

New features

  • Back-to-back support for Journey Sharing.

API changes

  • New ConsumerController class.

PolylineType

Old Value New Value
TRIP_PREVIEW_AUTO_ROUTE PREVIEW_AUTO_ROUTE
TRIP_PREVIEW_TAXI_ROUTE PREVIEW_TAXI_ROUTE
TRIP_PREVIEW_TRUCK_ROUTE PREVIEW_TRUCK_ROUTE
TRIP_PREVIEW_TWO_WHEELER_ROUTE PREVIEW_TWO_WHEELER_ROUTE
TRIP_ROUTE ACTIVE_ROUTE
REMAINING_ROUTE

ConsumerTripCallback

Old Value New Value
onTripRouteUpdated onTripActiveRouteUpdated
onTripRemainingDistanceUpdated onTripActiveRouteRemainingDistanceUpdated
onTripRemainingWaypointsUpdated()

ConsumerController

  • You can now set callbacks for states without entering the state.
Method Callback
startPickupSelection setPickupSelectionCallback
startDropoffSelection setDropoffSelectionCallback
startTripPreview setTripPreviewSelectionCallback
  • ConsumerController.setLanguage(String languageCode) allows you to set the language used in FleetEngine calls (for pickup point descriptions, for example).

Improvements

  • Dropoff selection state now has a draggable pin.
  • Removed camera animation in INITIALIZE state.
  • Replaced ManagedChannelBuilder with AndroidChannelBuilder.