Maneuver

public final class Maneuver
extends Object

java.lang.Object
   ↳ androidx.car.app.navigation.model.Maneuver


Information about a maneuver that the driver will be required to perform.

Summary

Nested classes

class Maneuver.Builder

A builder of Maneuver

Constants

int TYPE_DEPART

Starting point of the navigation.

int TYPE_DESTINATION

Arrival at a destination.

int TYPE_DESTINATION_LEFT

Arrival to a destination located to the left side of the road.

int TYPE_DESTINATION_RIGHT

Arrival to a destination located to the right side of the road.

int TYPE_DESTINATION_STRAIGHT

Arrival to a destination located straight ahead.

int TYPE_FERRY_BOAT

Drive towards a boat ferry for vehicles, where the entrance is straight ahead or in an unknown direction.

int TYPE_FERRY_BOAT_LEFT

Drive towards a boat ferry for vehicles, where the entrance is to the left.

int TYPE_FERRY_BOAT_RIGHT

Drive towards a boat ferry for vehicles, where the entrance is to the right.

int TYPE_FERRY_TRAIN

Drive towards a train ferry for vehicles (e.g.

int TYPE_FERRY_TRAIN_LEFT

Drive towards a train ferry for vehicles (e.g.

int TYPE_FERRY_TRAIN_RIGHT

Drive towards a train ferry for vehicles (e.g.

int TYPE_FORK_LEFT

Keep to the left as the road diverges.

int TYPE_FORK_RIGHT

Keep to the right as the road diverges.

int TYPE_KEEP_LEFT

No turn, from 0 (included) to 10 (excluded) degrees.

int TYPE_KEEP_RIGHT

No turn, from 0 (included) to 10 (excluded) degrees.

int TYPE_MERGE_LEFT

Current road joins another on the left.

int TYPE_MERGE_RIGHT

Current road joins another on the right.

int TYPE_MERGE_SIDE_UNSPECIFIED

Current road joins another without direction specified.

int TYPE_NAME_CHANGE

No turn, but the street name changes.

int TYPE_OFF_RAMP_NORMAL_LEFT

A left turn to exit a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

int TYPE_OFF_RAMP_NORMAL_RIGHT

A left right to exit a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

int TYPE_OFF_RAMP_SLIGHT_LEFT

A left turn to exit a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

int TYPE_OFF_RAMP_SLIGHT_RIGHT

A right turn to exit a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

int TYPE_ON_RAMP_NORMAL_LEFT

Regular left turn to enter a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

int TYPE_ON_RAMP_NORMAL_RIGHT

Regular right turn to enter a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

int TYPE_ON_RAMP_SHARP_LEFT

Sharp left turn to enter a turnpike or freeway, from 135 (included) to 175 (excluded) degrees.

int TYPE_ON_RAMP_SHARP_RIGHT

Sharp right turn to enter a turnpike or freeway, from 135 (included) to 175 (excluded) degrees.

int TYPE_ON_RAMP_SLIGHT_LEFT

Slight left turn to enter a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

int TYPE_ON_RAMP_SLIGHT_RIGHT

Slight right turn to enter a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

int TYPE_ON_RAMP_U_TURN_LEFT

Left turn onto the opposite side of the same street to enter a turnpike or freeway, from 175 (included) to 180 (included).

int TYPE_ON_RAMP_U_TURN_RIGHT

Right turn onto the opposite side of the same street to enter a turnpike or freeway, from 175 (included) to 180 (included).

int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW

Enter a counter-clockwise roundabout and take the Nth exit.

int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW_WITH_ANGLE

Enter a counter-clockwise roundabout and take the Nth exit after angle A degrees.

int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW

Enter a clockwise roundabout and take the Nth exit.

int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW_WITH_ANGLE

Enter a clockwise roundabout and take the Nth exit after angle A degrees.

int TYPE_ROUNDABOUT_ENTER_CCW

Entrance to a counter-clockwise roundabout on which the current road ends.

int TYPE_ROUNDABOUT_ENTER_CW

Entrance to a clockwise roundabout on which the current road ends.

int TYPE_ROUNDABOUT_EXIT_CCW

Used when leaving a counter-clockwise roundabout when the step starts in it.

int TYPE_ROUNDABOUT_EXIT_CW

Used when leaving a clockwise roundabout when the step starts in it.

int TYPE_STRAIGHT

Driver should steer straight.

int TYPE_TURN_NORMAL_LEFT

Regular left turn at an intersection, from 45 (included) to 135 (excluded) degrees.

int TYPE_TURN_NORMAL_RIGHT

Regular right turn at an intersection, from 45 (included) to 135 (excluded) degrees.

int TYPE_TURN_SHARP_LEFT

Sharp left turn at an intersection, from 135 (included) to 175 (excluded) degrees.

int TYPE_TURN_SHARP_RIGHT

Sharp right turn at an intersection, from 135 (included) to 175 (excluded) degrees.

int TYPE_TURN_SLIGHT_LEFT

Slight left turn at an intersection, from 10 (included) to 45 (excluded) degrees.

int TYPE_TURN_SLIGHT_RIGHT

Slight right turn at an intersection, from 10 (included) to 45 (excluded) degrees.

int TYPE_UNKNOWN

Maneuver type is unknown, no maneuver information should be displayed.

int TYPE_U_TURN_LEFT

Left turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees.

int TYPE_U_TURN_RIGHT

A right turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees.

Public methods

boolean equals(Object other)
CarIcon getIcon()

Returns the icon for the maneuver.

int getRoundaboutExitAngle()

Returns the roundabout exit angle in degrees to designate the amount of distance to travel around the roundabout.

int getRoundaboutExitNumber()

Returns the roundabout exit number, starting from 1 to designate the first exit after joining the roundabout, and increasing in circulation order.

int getType()

Returns the maneuver type.

int hashCode()
String toString()

Inherited methods

Constants

TYPE_DEPART

public static final int TYPE_DEPART

Starting point of the navigation.

For example, "Start driving on Main St."

Constant Value: 1 (0x00000001)

TYPE_DESTINATION

public static final int TYPE_DESTINATION

Arrival at a destination.

Constant Value: 39 (0x00000027)

TYPE_DESTINATION_LEFT

public static final int TYPE_DESTINATION_LEFT

Arrival to a destination located to the left side of the road.

Constant Value: 41 (0x00000029)

TYPE_DESTINATION_RIGHT

public static final int TYPE_DESTINATION_RIGHT

Arrival to a destination located to the right side of the road.

Constant Value: 42 (0x0000002a)

TYPE_DESTINATION_STRAIGHT

public static final int TYPE_DESTINATION_STRAIGHT

Arrival to a destination located straight ahead.

Constant Value: 40 (0x00000028)

TYPE_FERRY_BOAT

public static final int TYPE_FERRY_BOAT

Drive towards a boat ferry for vehicles, where the entrance is straight ahead or in an unknown direction.

For example, this is used to indicate "Take the ferry".

Constant Value: 37 (0x00000025)

TYPE_FERRY_BOAT_LEFT

public static final int TYPE_FERRY_BOAT_LEFT

Drive towards a boat ferry for vehicles, where the entrance is to the left.

For example, this is used to indicate "Take the ferry".

Constant Value: 47 (0x0000002f)

TYPE_FERRY_BOAT_RIGHT

public static final int TYPE_FERRY_BOAT_RIGHT

Drive towards a boat ferry for vehicles, where the entrance is to the right.

For example, this is used to indicate "Take the ferry".

Constant Value: 48 (0x00000030)

TYPE_FERRY_TRAIN

public static final int TYPE_FERRY_TRAIN

Drive towards a train ferry for vehicles (e.g. "Take the train"), where the entrance is straight ahead or in an unknown direction.

Constant Value: 38 (0x00000026)

TYPE_FERRY_TRAIN_LEFT

public static final int TYPE_FERRY_TRAIN_LEFT

Drive towards a train ferry for vehicles (e.g. "Take the train"), where the entrance is to the left.

Constant Value: 49 (0x00000031)

TYPE_FERRY_TRAIN_RIGHT

public static final int TYPE_FERRY_TRAIN_RIGHT

Drive towards a train ferry for vehicles (e.g. "Take the train"), where the entrance is to the right.

Constant Value: 50 (0x00000032)

TYPE_FORK_LEFT

public static final int TYPE_FORK_LEFT

Keep to the left as the road diverges.

For example, this is used to indicate "Keep left at the fork".

Constant Value: 25 (0x00000019)

TYPE_FORK_RIGHT

public static final int TYPE_FORK_RIGHT

Keep to the right as the road diverges.

For example, this is used to indicate "Keep right at the fork".

Constant Value: 26 (0x0000001a)

TYPE_KEEP_LEFT

public static final int TYPE_KEEP_LEFT

No turn, from 0 (included) to 10 (excluded) degrees.

This is used in contrast to TYPE_STRAIGHT for disambiguating cases where there is more than one option to go into the same general direction.

Constant Value: 3 (0x00000003)

TYPE_KEEP_RIGHT

public static final int TYPE_KEEP_RIGHT

No turn, from 0 (included) to 10 (excluded) degrees.

This is used in contrast to TYPE_STRAIGHT for disambiguating cases where there is more than one option to go into the same general direction.

Constant Value: 4 (0x00000004)

TYPE_MERGE_LEFT

public static final int TYPE_MERGE_LEFT

Current road joins another on the left.

For example, this is used to indicate "Merge left onto Main St.".

Constant Value: 27 (0x0000001b)

TYPE_MERGE_RIGHT

public static final int TYPE_MERGE_RIGHT

Current road joins another on the right.

For example, this is used to indicate "Merge left onto Main St.".

Constant Value: 28 (0x0000001c)

TYPE_MERGE_SIDE_UNSPECIFIED

public static final int TYPE_MERGE_SIDE_UNSPECIFIED

Current road joins another without direction specified.

For example, this is used to indicate "Merge onto Main St.".

Constant Value: 29 (0x0000001d)

TYPE_NAME_CHANGE

public static final int TYPE_NAME_CHANGE

No turn, but the street name changes.

For example, "Continue on Main St."

Constant Value: 2 (0x00000002)

TYPE_OFF_RAMP_NORMAL_LEFT

public static final int TYPE_OFF_RAMP_NORMAL_LEFT

A left turn to exit a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

Constant Value: 23 (0x00000017)

TYPE_OFF_RAMP_NORMAL_RIGHT

public static final int TYPE_OFF_RAMP_NORMAL_RIGHT

A left right to exit a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

Constant Value: 24 (0x00000018)

TYPE_OFF_RAMP_SLIGHT_LEFT

public static final int TYPE_OFF_RAMP_SLIGHT_LEFT

A left turn to exit a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

Constant Value: 21 (0x00000015)

TYPE_OFF_RAMP_SLIGHT_RIGHT

public static final int TYPE_OFF_RAMP_SLIGHT_RIGHT

A right turn to exit a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

Constant Value: 22 (0x00000016)

TYPE_ON_RAMP_NORMAL_LEFT

public static final int TYPE_ON_RAMP_NORMAL_LEFT

Regular left turn to enter a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

Constant Value: 15 (0x0000000f)

TYPE_ON_RAMP_NORMAL_RIGHT

public static final int TYPE_ON_RAMP_NORMAL_RIGHT

Regular right turn to enter a turnpike or freeway, from 45 (included) to 135 (excluded) degrees.

Constant Value: 16 (0x00000010)

TYPE_ON_RAMP_SHARP_LEFT

public static final int TYPE_ON_RAMP_SHARP_LEFT

Sharp left turn to enter a turnpike or freeway, from 135 (included) to 175 (excluded) degrees.

Constant Value: 17 (0x00000011)

TYPE_ON_RAMP_SHARP_RIGHT

public static final int TYPE_ON_RAMP_SHARP_RIGHT

Sharp right turn to enter a turnpike or freeway, from 135 (included) to 175 (excluded) degrees.

Constant Value: 18 (0x00000012)

TYPE_ON_RAMP_SLIGHT_LEFT

public static final int TYPE_ON_RAMP_SLIGHT_LEFT

Slight left turn to enter a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

Constant Value: 13 (0x0000000d)

TYPE_ON_RAMP_SLIGHT_RIGHT

public static final int TYPE_ON_RAMP_SLIGHT_RIGHT

Slight right turn to enter a turnpike or freeway, from 10 (included) to 45 (excluded) degrees.

Constant Value: 14 (0x0000000e)

TYPE_ON_RAMP_U_TURN_LEFT

public static final int TYPE_ON_RAMP_U_TURN_LEFT

Left turn onto the opposite side of the same street to enter a turnpike or freeway, from 175 (included) to 180 (included).

Constant Value: 19 (0x00000013)

TYPE_ON_RAMP_U_TURN_RIGHT

public static final int TYPE_ON_RAMP_U_TURN_RIGHT

Right turn onto the opposite side of the same street to enter a turnpike or freeway, from 175 (included) to 180 (included).

Constant Value: 20 (0x00000014)

TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW

public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW

Enter a counter-clockwise roundabout and take the Nth exit.

The exit number must be passed when created the maneuver.

For example, this is used to indicate "At the roundabout, take the Nth exit".

Constant Value: 34 (0x00000022)

TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW_WITH_ANGLE

public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW_WITH_ANGLE

Enter a counter-clockwise roundabout and take the Nth exit after angle A degrees.

The exit number and angle must be passed when creating the maneuver.

For example, this is used to indicate "At the roundabout, take a sharp right at the Nth exit".

Constant Value: 35 (0x00000023)

TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW

public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW

Enter a clockwise roundabout and take the Nth exit.

The exit number must be passed when created the maneuver.

For example, this is used to indicate "At the roundabout, take the Nth exit".

Constant Value: 32 (0x00000020)

TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW_WITH_ANGLE

public static final int TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW_WITH_ANGLE

Enter a clockwise roundabout and take the Nth exit after angle A degrees.

The exit number and angle must be passed when creating the maneuver.

For example, this is used to indicate "At the roundabout, take the Nth exit".

Constant Value: 33 (0x00000021)

TYPE_ROUNDABOUT_ENTER_CCW

public static final int TYPE_ROUNDABOUT_ENTER_CCW

Entrance to a counter-clockwise roundabout on which the current road ends.

For example, this is used to indicate "Enter the roundabout".

Constant Value: 45 (0x0000002d)

TYPE_ROUNDABOUT_ENTER_CW

public static final int TYPE_ROUNDABOUT_ENTER_CW

Entrance to a clockwise roundabout on which the current road ends.

For example, this is used to indicate "Enter the roundabout".

Constant Value: 43 (0x0000002b)

TYPE_ROUNDABOUT_EXIT_CCW

public static final int TYPE_ROUNDABOUT_EXIT_CCW

Used when leaving a counter-clockwise roundabout when the step starts in it.

For example, this is used to indicate "Exit the roundabout".

Constant Value: 46 (0x0000002e)

TYPE_ROUNDABOUT_EXIT_CW

public static final int TYPE_ROUNDABOUT_EXIT_CW

Used when leaving a clockwise roundabout when the step starts in it.

For example, this is used to indicate "Exit the roundabout".

Constant Value: 44 (0x0000002c)

TYPE_STRAIGHT

public static final int TYPE_STRAIGHT

Driver should steer straight.

Constant Value: 36 (0x00000024)

TYPE_TURN_NORMAL_LEFT

public static final int TYPE_TURN_NORMAL_LEFT

Regular left turn at an intersection, from 45 (included) to 135 (excluded) degrees.

Constant Value: 7 (0x00000007)

TYPE_TURN_NORMAL_RIGHT

public static final int TYPE_TURN_NORMAL_RIGHT

Regular right turn at an intersection, from 45 (included) to 135 (excluded) degrees.

Constant Value: 8 (0x00000008)

TYPE_TURN_SHARP_LEFT

public static final int TYPE_TURN_SHARP_LEFT

Sharp left turn at an intersection, from 135 (included) to 175 (excluded) degrees.

Constant Value: 9 (0x00000009)

TYPE_TURN_SHARP_RIGHT

public static final int TYPE_TURN_SHARP_RIGHT

Sharp right turn at an intersection, from 135 (included) to 175 (excluded) degrees.

Constant Value: 10 (0x0000000a)

TYPE_TURN_SLIGHT_LEFT

public static final int TYPE_TURN_SLIGHT_LEFT

Slight left turn at an intersection, from 10 (included) to 45 (excluded) degrees.

Constant Value: 5 (0x00000005)

TYPE_TURN_SLIGHT_RIGHT

public static final int TYPE_TURN_SLIGHT_RIGHT

Slight right turn at an intersection, from 10 (included) to 45 (excluded) degrees.

Constant Value: 6 (0x00000006)

TYPE_UNKNOWN

public static final int TYPE_UNKNOWN

Maneuver type is unknown, no maneuver information should be displayed.

This type may be interpreted differently depending on the consumer. In some cases the previous maneuver will continue to be shown while in others no maneuver will be shown at all.

Constant Value: 0 (0x00000000)

TYPE_U_TURN_LEFT

public static final int TYPE_U_TURN_LEFT

Left turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees.

Constant Value: 11 (0x0000000b)

TYPE_U_TURN_RIGHT

public static final int TYPE_U_TURN_RIGHT

A right turn onto the opposite side of the same street, from 175 (included) to 180 (included) degrees.

Constant Value: 12 (0x0000000c)

Public methods

equals

public boolean equals (Object other)

Parameters
other Object

Returns
boolean

getIcon

public CarIcon getIcon ()

Returns the icon for the maneuver.

Optional field that when not set may be shown in the target display by a generic image representing the specific maneuver.

Returns
CarIcon

getRoundaboutExitAngle

public int getRoundaboutExitAngle ()

Returns the roundabout exit angle in degrees to designate the amount of distance to travel around the roundabout. Only relevant if the type is TYPE_ROUNDABOUT_ENTER_AND_EXIT_CW_WITH_ANGLE or TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW_WITH_ANGLE.

For example, if the drive is joining a counter-clockwise roundabout with equally spaced exits then the exit to the right would be at 45 degrees, the one straight ahead would be at 90 degrees, the one to the left would at 270 degrees and the one used by the driver to join the roundabout would be at 360 degrees.

The angle can also be set for irregular roundabouts. For example a roundabout with three exits at 90, 270 and 360 degrees could also have the desired exit angle specified.

Required with the type is a roundabout with an angle.

Returns
int

getRoundaboutExitNumber

public int getRoundaboutExitNumber ()

Returns the roundabout exit number, starting from 1 to designate the first exit after joining the roundabout, and increasing in circulation order. Only relevant if the type is any variation of TYPE_ROUNDABOUT_ENTER_AND_EXIT_*.

For example, if the driver is joining a counter-clockwise roundabout with 4 exits, then the exit to the right would be exit #1, the one straight ahead would be exit #2, the one to the left would be exit #3 and the one used by the driver to join the roundabout would be exit #4.

Required when the type is a roundabout.

Returns
int

getType

public int getType ()

Returns the maneuver type.

Required to be set at all times.

Returns
int

hashCode

public int hashCode ()

Returns
int

toString

public String toString ()

Returns
String