# NavigationManagerCallback

# NavigationManagerCallback

Artifact:[androidx.car.app:app](https://developer.android.com/jetpack/androidx/releases/car-app)  
[View Source](https://cs.android.com/search?q=file:androidx/car/app/navigation/NavigationManagerCallback.java+class:androidx.car.app.navigation.NavigationManagerCallback)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/car/app/navigation/NavigationManagerCallback "View this page in Java")

<br />

```
interface NavigationManagerCallback
```

<br />

*** ** * ** ***

Callback for events from the[NavigationManager](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/NavigationManager).  

|                                                     See also                                                      |
|-------------------------------------------------------------------------------------------------------------------|---|
| [NavigationManager](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/NavigationManager) |   |

## Summary

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onAutoDriveEnabled](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/NavigationManagerCallback#onAutoDriveEnabled())`()` Notifies the app that, from this point onwards, when the user chooses to navigate to a destination, the app should start simulating a drive towards that destination. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onStopNavigation](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/NavigationManagerCallback#onStopNavigation())`()` Notifies the app to stop active navigation, which may occurs when another source such as the car head unit starts navigating.                                             |

## Public functions

### onAutoDriveEnabled

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)  

```
fun onAutoDriveEnabled(): Unit
```

Notifies the app that, from this point onwards, when the user chooses to navigate to a destination, the app should start simulating a drive towards that destination.

This mode should remain active until[finishCarApp](https://developer.android.com/reference/kotlin/androidx/car/app/CarContext#finishCarApp())is called.

This functionality is used to allow verifying the app's navigation capabilities without being in an actual car.  

### onStopNavigation

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)  

```
fun onStopNavigation(): Unit
```

Notifies the app to stop active navigation, which may occurs when another source such as the car head unit starts navigating.

When receiving this callback, the app must stop all routing including navigation voice guidance, routing-related notifications, and updating trip information via[updateTrip](https://developer.android.com/reference/kotlin/androidx/car/app/navigation/NavigationManager#updateTrip(androidx.car.app.navigation.model.Trip)).