TurnByTurnManager
Stay organized with collections
Save and categorize content based on your preferences.
Manages navigation data encoded in a bundle for interprocess communication. Reads turn-by-turn
navigation information sent from Nav SDK.
Public Constructor Summary
Inherited Method Summary
From class
java.lang.Object
boolean
|
equals(Object arg0)
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
Constants
public
static
final
int
MSG_NAV_INFO
Nav info sent fom Nav SDK in the form of a Message
will have the message code set to
this value in Message.what
.
Constant Value:
7200
Public Constructors
public
TurnByTurnManager
()
Public Methods
public
abstract
NavInfo
readNavInfoFromBundle
(Bundle bundle)
Reads navigation data from a bundle into a NavInfo
object. The data bundle can be
retrieved from a message using Message.getData()
.
Parameters
bundle |
navigation information encoded in message data |
Returns
- a
NavInfo
object containing navigation information read from the message data
public
abstract
Bundle
writeNavInfoToBundle
(NavInfo navInfo)
Writes navigation data into a bundle for interprocess communication.
Parameters
navInfo |
the navigation information to be written |
Returns
- a
Bundle
containing the navigation information
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-28 UTC.
[null,null,["Last updated 2025-08-28 UTC."],[[["\u003cp\u003e\u003ccode\u003eTurnByTurnManager\u003c/code\u003e manages navigation data for interprocess communication, reading turn-by-turn information from the Nav SDK.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to read and write navigation data to and from a \u003ccode\u003eBundle\u003c/code\u003e for easy data transfer.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ecreateInstance()\u003c/code\u003e allows the creation of a \u003ccode\u003eTurnByTurnManager\u003c/code\u003e instance.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMSG_NAV_INFO\u003c/code\u003e is a constant representing the message code for navigation information sent from the Nav SDK.\u003c/p\u003e\n"],["\u003cp\u003eThis class and its methods are in beta and subject to change.\u003c/p\u003e\n"]]],[],null,["# TurnByTurnManager\n\npublic abstract class **TurnByTurnManager** extends Object \nManages navigation data encoded in a bundle for interprocess communication. Reads turn-by-turn\nnavigation information sent from Nav SDK. \n\n### Constant Summary\n\n|-----|----------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| int | [MSG_NAV_INFO](/maps/documentation/navigation/android-sdk/reference/com/google/android/libraries/mapsplatform/turnbyturn/TurnByTurnManager#MSG_NAV_INFO) | Nav info sent fom Nav SDK in the form of a [Message](https://developer.android.com/reference/android/os/Message.html) will have the message code set to this value in [Message.what](https://developer.android.com/reference/android/os/Message.html#what). |\n\n### Public Constructor Summary\n\n|---|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | [TurnByTurnManager](/maps/documentation/navigation/android-sdk/reference/com/google/android/libraries/mapsplatform/turnbyturn/TurnByTurnManager#TurnByTurnManager())() |\n\n### Public Method Summary\n\n|---------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [TurnByTurnManager](/maps/documentation/navigation/android-sdk/reference/com/google/android/libraries/mapsplatform/turnbyturn/TurnByTurnManager) | [createInstance](/maps/documentation/navigation/android-sdk/reference/com/google/android/libraries/mapsplatform/turnbyturn/TurnByTurnManager#createInstance())() Create an instance of [TurnByTurnManager](/maps/documentation/navigation/android-sdk/reference/com/google/android/libraries/mapsplatform/turnbyturn/TurnByTurnManager). |\n| abstract [NavInfo](/maps/documentation/navigation/android-sdk/reference/com/google/android/libraries/mapsplatform/turnbyturn/model/NavInfo) | [readNavInfoFromBundle](/maps/documentation/navigation/android-sdk/reference/com/google/android/libraries/mapsplatform/turnbyturn/TurnByTurnManager#readNavInfoFromBundle(android.os.Bundle))(Bundle bundle) | [Preview](/maps/launch-stages#preview) feature Reads navigation data from a bundle into a [NavInfo](/maps/documentation/navigation/android-sdk/reference/com/google/android/libraries/mapsplatform/turnbyturn/model/NavInfo) object. |\n| abstract Bundle | [writeNavInfoToBundle](/maps/documentation/navigation/android-sdk/reference/com/google/android/libraries/mapsplatform/turnbyturn/TurnByTurnManager#writeNavInfoToBundle(com.google.android.libraries.mapsplatform.turnbyturn.model.NavInfo))([NavInfo](/maps/documentation/navigation/android-sdk/reference/com/google/android/libraries/mapsplatform/turnbyturn/model/NavInfo) navInfo) | [Preview](/maps/launch-stages#preview) feature Writes navigation data into a bundle for interprocess communication. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|------------------|---------------------------|\n| boolean | equals(Object arg0) |\n| final Class\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| String | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nConstants\n---------\n\n#### public static final int\n**MSG_NAV_INFO**\n\nNav info sent fom Nav SDK in the form of a [Message](https://developer.android.com/reference/android/os/Message.html) will have the message code set to\nthis value in [Message.what](https://developer.android.com/reference/android/os/Message.html#what). \nConstant Value: 7200\n\nPublic Constructors\n-------------------\n\n#### public\n**TurnByTurnManager**\n()\n\n\u003cbr /\u003e\n\nPublic Methods\n--------------\n\n#### public static [TurnByTurnManager](/maps/documentation/navigation/android-sdk/reference/com/google/android/libraries/mapsplatform/turnbyturn/TurnByTurnManager)\n**createInstance**\n()\n\nCreate an instance of [TurnByTurnManager](/maps/documentation/navigation/android-sdk/reference/com/google/android/libraries/mapsplatform/turnbyturn/TurnByTurnManager). \n\n##### Returns\n\n- a new [TurnByTurnManager](/maps/documentation/navigation/android-sdk/reference/com/google/android/libraries/mapsplatform/turnbyturn/TurnByTurnManager). \n\n#### public abstract [NavInfo](/maps/documentation/navigation/android-sdk/reference/com/google/android/libraries/mapsplatform/turnbyturn/model/NavInfo)\n**readNavInfoFromBundle**\n(Bundle bundle)\n\n\u003cbr /\u003e\n\n| [Preview](/maps/launch-stages#preview) feature\n\nReads navigation data from a bundle into a [NavInfo](/maps/documentation/navigation/android-sdk/reference/com/google/android/libraries/mapsplatform/turnbyturn/model/NavInfo) object. The data bundle can be\nretrieved from a message using [Message.getData()](https://developer.android.com/reference/android/os/Message.html#getData()). \n\n##### Parameters\n\n| bundle | navigation information encoded in message data |\n|--------|------------------------------------------------|\n\n##### Returns\n\n- a [NavInfo](/maps/documentation/navigation/android-sdk/reference/com/google/android/libraries/mapsplatform/turnbyturn/model/NavInfo) object containing navigation information read from the message data \n\n#### public abstract Bundle\n**writeNavInfoToBundle**\n([NavInfo](/maps/documentation/navigation/android-sdk/reference/com/google/android/libraries/mapsplatform/turnbyturn/model/NavInfo) navInfo)\n\n\u003cbr /\u003e\n\n| [Preview](/maps/launch-stages#preview) feature\n\nWrites navigation data into a bundle for interprocess communication. \n\n##### Parameters\n\n| navInfo | the navigation information to be written |\n|---------|------------------------------------------|\n\n##### Returns\n\n- a [Bundle](https://developer.android.com/reference/android/os/Bundle.html) containing the navigation information"]]