API directory · Google Maps Platform
Navigation SDK: in-app turn-by-turn on Google routing
The Navigation SDK for Android and iOS embeds Google's turn-by-turn navigation directly in your app, on your UI. It gives you the Google routing engine, real-time traffic disruption handling, waypoint management and a turn-by-turn data feed, either with the pre-built Google Navigation UI or through a fully custom interface. For India mobility and delivery apps, it replaces the redirect to the Google Maps app with navigation inside your product.
Get a demo →What the API does
Google's navigation engine embedded directly in your app
The Navigation SDK for Android and iOS gives app developers access to Google's navigation engine, routing logic and real-time traffic disruption handling inside their own application, without redirecting users to the Google Maps app. It supports the pre-built Google Navigation UI (for rapid integration) and a fully custom UI through the turn-by-turn data feed API (for branded navigation experiences).
Capabilities include waypoint management, routing preferences, real-time route recalculation on traffic disruptions, Android Auto and CarPlay support, day and night display modes and speedometer alerts (iOS). Flutter and React Native wrappers are available as open-source projects; note that these wrappers are not covered by GMP support SLAs, though the underlying routing services are.
Initialisation Activity
// Initialisation is asynchronous. You never construct a Navigator;
// the SDK hands you one when it is ready, or tells you why it is not.
NavigationApi.getNavigator(this, object : NavigationApi.NavigatorListener {
override fun onNavigatorReady(navigator: Navigator) {
val routingOptions = RoutingOptions()
routingOptions.travelMode(RoutingOptions.TravelMode.TWO_WHEELER)
val drop = Waypoint.builder()
.setPlaceIdString("ChIJXXXXXXXXXXXXXXXXXXXXXXX")
.setTitle("Drop 3 of 5")
.build()
navigator.setDestination(drop, routingOptions)
.setOnResultListener { status ->
if (status == Navigator.RouteStatus.OK) {
navigator.startGuidance()
}
// else NO_ROUTE_FOUND, NETWORK_ERROR, LOCATION_DISABLED,
// LOCATION_UNKNOWN, ROUTE_CANCELED, QUOTA_CHECK_FAILED,
// WAYPOINT_ERROR, DUPLICATE_WAYPOINTS_ERROR
}
}
override fun onError(errorCode: Int) {
// NOT_AUTHORIZED, TERMS_NOT_ACCEPTED, LOCATION_PERMISSION_MISSING
}
}) Callback surface listeners
// The turn-by-turn data feed. This is the surface a fully branded
// navigation UI subscribes to instead of using the built-in one.
navigator.addArrivalListener {
navigator.continueToNextDestination()
navigator.startGuidance()
}
navigator.addRouteChangedListener {
// the engine picked a different path
}
navigator.addReroutingListener {
// a reroute has been requested, before the new route arrives
}
navigator.addRemainingTimeOrDistanceChangedListener(60, 100) {
// fires past 60 s or 100 m of change, not on every GPS tick
navigator.getCurrentTimeAndDistance()
}
navigator.setAudioGuidanceSettings(
AudioGuidanceSettings.builder()
.setGuidanceMode(AudioGuidanceSettings.GuidanceMode.VOICE_ALERTS_AND_GUIDANCE)
.build()
) Use cases
Where teams embed Navigation SDK instead of redirecting to Google Maps
- 01
Ride-sharing · Driver navigation inside the cab app
Ride-sharing driver apps use the Navigation SDK to give drivers turn-by-turn guidance without leaving the app to open Google Maps. The turn-by-turn data feed lets the driver UI show custom overlays, branded instructions and trip-specific information alongside the navigation.
- 02
Last mile · Delivery rider navigation with waypoint management
Delivery rider apps embed Navigation SDK with multi-waypoint routing so a rider navigates a full multi-stop run without leaving the delivery app, and the app tracks real-time position against the route for dispatch visibility.
- 03
Fleet · Android Auto and CarPlay for commercial vehicles
Navigation SDK supports Android Auto and CarPlay, so commercial vehicle operators can deploy in-app navigation to drivers through the vehicle's built-in display system without a separate hardware integration.
- 04
Consumer · Custom-branded navigation experience
Consumer apps that want navigation as a differentiator use the custom UI path: the turn-by-turn data feed from Navigation SDK drives a fully branded navigation surface, while Google's routing and traffic engine runs underneath.
Where Lepton comes in
SDK integration, custom UI data feed and Fleet Engine coordination
Navigation SDK is typically integrated as part of a broader Mobility stack alongside the Driver SDK, Consumer SDK and Fleet Engine. We deliver the full stack, not just the navigation SDK in isolation, so the product has position reporting, trip management and ETA all working together.
- 01
Integration · End-to-end Navigation SDK wiring for Android and iOS
We integrate the Navigation SDK into the driver or rider app: UI configuration, waypoint management, routing preference setup, Android Auto or CarPlay support and the turn-by-turn data feed for custom UI builds.
- 02
Mobility stack · Navigation SDK plus Driver SDK plus Fleet Engine
Navigation SDK works best when the driver position is fed back to Fleet Engine for real-time ETAs on the consumer side. We wire the complete Mobility Accelerate stack: Navigation, Driver SDK, Consumer SDK and Fleet Engine as one coordinated system.
- 03
GCP · GCP setup, JWT auth and API enablement
Navigation SDK authentication uses service accounts and JWT tokens. We configure the GCP project, service account scoping, JWT generation and API enablement so the SDK is authorized and callable from day one.
Tell us the navigation use case. We will design the SDK integration.
Bring the rider or driver app problem. We map it to the Navigation SDK capabilities and walk through the end-to-end integration.
Get a demo →