{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreicfsf3azisyej77uj5uy7bmggbnm6zctlnywses326f3lrmmqdzki",
"uri": "at://did:plc:25rdn5elo5izoxrmtis34zuk/app.bsky.feed.post/3moowr57kwq22"
},
"coverImage": {
"$type": "blob",
"ref": {
"$link": "bafkreidpo2omfykhcrfdpxytee2tywrrx2ruefq3zrcelzymevvwtgtapy"
},
"mimeType": "image/webp",
"size": 96912
},
"path": "/luc45hn/how-to-open-google-maps-in-turn-by-turn-navigation-mode-from-a-pwa-android-16e0",
"publishedAt": "2026-06-20T03:14:52.000Z",
"site": "https://dev.to",
"tags": [
"webdev",
"react",
"javascript",
"android",
"GitHub repo",
"Live app",
"@vis"
],
"textContent": "The next attempt was the standard Maps URL:\n\n\n\n window.open(`https://maps.google.com/maps?daddr=${lat},${lng}`, '_blank');\n\n\nThis opens Maps, but in the browser — not the app. And it shows the route preview, not turn-by-turn navigation.\n\n## What worked: Android Intent URLs\n\nAndroid supports a special URL scheme that tells Chrome to launch a native app directly:\n\n\n\n window.location.href = `intent://navigation/now?ll=${lat},${lng}&title=Next+stop#Intent;scheme=google.navigation;package=com.google.android.apps.maps;end`;\n\n\nBreaking it down:\n\n * `intent://` — tells Chrome this is an Android intent\n * `navigation/now?ll=${lat},${lng}` — opens Maps in navigation mode, starting immediately\n * `#Intent;scheme=google.navigation` — the URI scheme to use\n * `package=com.google.android.apps.maps` — the target app package\n * `end` — closes the intent syntax\n\n\n\nThis opens the Google Maps app directly and **starts turn-by-turn navigation automatically** — no extra taps needed. It also works with Android Auto.\n\n## The full function\n\n\n export function openNavigation(destination: { lat: number; lng: number }): void {\n window.location.href = `intent://navigation/now?ll=${destination.lat},${destination.lng}&title=Next+stop#Intent;scheme=google.navigation;package=com.google.android.apps.maps;end`;\n }\n\n\nCall it on any user gesture (tap, click) and it works without being blocked by the browser.\n\n## The app\n\nThe full PWA is open source if you want to see the context:\n\n * 🔗 GitHub repo\n * 🌐 Live app\n\n\n\nBuilt with React + TypeScript + Vite + Dexie.js + @vis.gl/react-google-maps.\n\nIf you're building a PWA that needs to hand off to Google Maps navigation on Android, this intent URL is the cleanest solution I found. Hope it saves you the hour I spent figuring it out.",
"title": "How to open Google Maps in turn-by-turn navigation mode from a PWA (Android)"
}