Register now for Android Dev Summit 2019!

Step

public final class Step
extends Object implements VersionedParcelable

java.lang.Object
   ↳ androidx.car.cluster.navigation.Step


An action that the driver should take in order to remain on the current navigation route. For example: turning onto a street, taking a highway exit and merging onto a different highway, continuing straight through a roundabout, etc.

Summary

Nested classes

class Step.Builder

Builder for creating a Step  

Public methods

boolean equals(Object o)
RichText getCue()

Returns auxiliary instructions on how complete this navigation step, described as a RichText object containing a sequence of texts (e.g.: "towards", "Wallaby way") and images (e.g.: road badge of a highway).

Distance getDistance()

Returns the distance from the current position to the point where this navigation step should be executed, or null if distance to this step was not provided.

List<Lane> getLanes()

Returns an unmodifiable list containing the configuration of road lanes at the point where the driver should execute this step, or an empty list if lane configuration metadata is not available.

ImageReference getLanesImage()

Returns an image representing the lanes configuration at this point in the navigation, or null if the lanes configuration image was not provided.

Maneuver getManeuver()

Returns the maneuver to be performed on this step, or null if this step doesn't involve a maneuver.

int hashCode()
String toString()

Inherited methods

Public methods

equals

public boolean equals (Object o)

Parameters
o Object

Returns
boolean

getCue

public RichText getCue ()

Returns auxiliary instructions on how complete this navigation step, described as a RichText object containing a sequence of texts (e.g.: "towards", "Wallaby way") and images (e.g.: road badge of a highway).

If space is not enough to display the complete content of this RichText instance, consumers must display the beginning of these instructions, cutting as much from the end as needed.

Returns
RichText

getDistance

public Distance getDistance ()

Returns the distance from the current position to the point where this navigation step should be executed, or null if distance to this step was not provided.

Returns
Distance

getLanes

public List<Lane> getLanes ()

Returns an unmodifiable list containing the configuration of road lanes at the point where the driver should execute this step, or an empty list if lane configuration metadata is not available. Lane configurations are listed from left to right.

Returns
List<Lane>

getLanesImage

public ImageReference getLanesImage ()

Returns an image representing the lanes configuration at this point in the navigation, or null if the lanes configuration image was not provided. The image, if provided, is expected to contain:

  • A representation of all lanes, one next to the other in a single row.
  • For each lane, a set of arrows, representing each possible driving directions (e.g.: straight, left turn, right turn, etc.) within such lane.
  • Each of such driving directions that would keep the driver within the navigation route should be highlighted.
Lane configuration images are expected to be displayed in a canvas with fixed height and variable width.

Returns
ImageReference

getManeuver

public Maneuver getManeuver ()

Returns the maneuver to be performed on this step, or null if this step doesn't involve a maneuver.

Returns
Maneuver

hashCode

public int hashCode ()

Returns
int

toString

public String toString ()

Returns
String