Step

class Step : VersionedParcelable
kotlin.Any
   ↳ 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

Builder for creating a Step

Public methods

Boolean
equals(other: Any?)

RichText?

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?

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.

MutableList<Lane!>

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?

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

Maneuver?

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

Int

String

Public methods

equals

fun equals(other: Any?): Boolean

getCue

@Nullable fun getCue(): RichText?

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.

getDistance

@Nullable fun getDistance(): Distance?

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.

getLanes

@NonNull fun getLanes(): MutableList<Lane!>

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.

getLanesImage

@Nullable fun getLanesImage(): ImageReference?

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.

getManeuver

@Nullable fun getManeuver(): Maneuver?

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

hashCode

fun hashCode(): Int

toString

fun toString(): String