CarPlay and Android Auto

Meridian Atlas puts your navigation app on the car's screen: CarPlay on iOS and Android Auto on Android, from the Swift, Android, React Native and Flutter SDKs. The car screen shows:

  • the Atlas map, following the car;
  • map buttons: zoom, pan, the route overview and recentre;
  • night mode, following the car's headlights (Day and night);
  • a route preview to choose from.

While guiding, it adds:

  • manoeuvres in the route's UK wording, with junction and exit numbers and roundabout exits;
  • lanes;
  • the time and distance left;
  • reroutes;
  • each stop of a multi-stop trip;
  • pauses for lost GPS, rerouting and going offline;
  • speed camera alerts and the speed limit sign, with the speed beside it when over the limit and a lower limit ahead (Speed limits and cameras);
  • the manoeuvre and lanes on the instrument cluster and head-up display, where the car has them.

Your app keeps its navigation session. Give the car screen each route you guide along, and each update, as you do your map. React Native and Flutter pass the updates natively, so your code only shows routes.

How it looks and behaves

The car's own templates carry the guidance card, the trip estimates and the buttons, so the car screen looks like the car's other apps. The Atlas map is the only thing drawn in the map area, with one exception: the speed limit sign, in its lower corner.

Colours come from Meridian's design tokens. The guidance card is Meridian navy unless your brand's.

The guidance card is kept short, so the map shows round it:

  • The manoeuvre symbol: 38 points on CarPlay, drawn heavy (5.5-point lines) to read at a glance. Android Auto sizes the symbol itself; Atlas draws it in the car screen's pixels at the 128 dp the Car App Library asks for.
  • Lanes: a picture 30 points tall on CarPlay and 40 dp on Android Auto, the lanes to use bright and the best one underlined. CarPlay's instrument cluster and head-up display get the lanes as data (CPLaneGuidance), as does Android Auto's (Lane).
  • The instruction: one line where it fits. Road names are written as UK car screens print them ("John Dalton St", "Oxford Rd"). On a small CarPlay screen the card shows the road alone ("John Dalton St", the arrow saying which way) or a roundabout's exit; a wider one shows the whole instruction. Spoken guidance and the notification on the phone keep the words in full. The wording has the rules.
  • Pictures at the car's scale: CarPlay reads a picture's pixels at the car screen's display scale, so Atlas draws the symbol and lanes at that scale (CPInterfaceController.carTraitCollection), not the iPhone's.

The map buttons are zoom in, zoom out and pan, and a fourth that changes:

  • Overview while guiding with the map following the car. It shows the whole remaining route (the car, each stop left and the destination) flat and north-up, clear of the guidance card. CarPlay's or Android Auto's guidance carries on; the zoom and pan buttons move the overview.
  • Recentre once the driver has panned or zoomed the map, or in the overview. The map follows the car again at its own distance, tilt and heading.
  • Nothing in free drive or a route preview while the map follows the car.

For the car's screen reader, Siri and Voice Control, CarPlay's map buttons are labelled "Zoom in", "Zoom out", "Route overview", "Recentre" and "Pan", and an alert's picture is labelled with what it is ("Speed camera", "New route", "Warning"). Android Auto reads an action's title (Retry, End, Simulate); the Car App Library gives the map's buttons no title or description, so they are icons beside Android Auto's own Pan (Accessibility).

Leaving CarPlay's panning mode (its Done button) recentres the map. Your app can do the same: showOverview() and recentre() on AtlasCarPlay and AtlasCar, and on React Native's and Flutter's AtlasCarScreen. With autoRecentreAfter on the car screen's map presentation (off by default; the navigation guide's "The map"), the map follows the car again by itself after the driver last used the map buttons.

Both platforms' rules for navigation apps are followed:

  • Map buttons:
    • at most four on CarPlay (Android Auto's map action strip takes four too);
    • panning has its own Done button.
  • Alerts:
    • only for the trip (speed cameras);
    • only where warning of cameras is lawful (the UK and Ireland; not France, Germany or Switzerland);
    • at the same distance as the phone's: 22.4 seconds before the camera at its limit or the car's speed;
    • dismissed once the camera is passed.
  • Text:
    • every manoeuvre comes with shorter forms ("Turn right" after "At the traffic lights, turn right onto Booth Street");
    • the car picks the one that fits.

When the car connects mid-trip, the car screen picks up where guidance is. Disconnecting leaves the phone guiding.

Locating, lost GPS and reroutes. The car screens show each snapshot's status (the guidance status, the SDK guide), as the phone's panels do, never the raw phase:

StatusCarPlayAndroid Auto
Locating… (guidance has begun, no usable fix yet; up to 10 s)the trip paused for .locating, "Locating…"the card says "Locating…"; the cluster's trip is loading
No GPS signal (10 s from the start; mid-drive 3 s after the session's own 5 s)paused for .locating, "No GPS signal""No GPS signal", "Guidance carries on when the signal is back"
A few seconds without GPS, a tunnelthe card staysthe card stays
Finding a new route… (a reroute taking over a second)paused for .rerouting, "Finding a new route…""Finding a new route…"
The new routethe new manoeuvres, and an alert "New route", "2 min longer" for 6 s, oncethe new manoeuvres, and an alert (car API 5; a toast before) for 6 s, once
Can't find a route (two tries failed)paused for .proceedToRoute (no spinner), "Can't find a route. Check your connection", and an alert with Retry"Can't find a route", "Check your connection", and Retry beside End
Offlinepaused for .proceedToRoute, "Offline. New route when you're back online""Offline", "New route when you're back online"

Retry needs the app: set onRetryReroute (Swift AtlasCarPlay, Kotlin AtlasCar) to call your navigation's retryReroute(). Without it, the failure shows with no Retry, and the session keeps trying by itself. The React Native and Flutter plugins take Retry themselves.

No flicker. The card changes only when what it shows changes:

  • The "then" manoeuvre shown with the next one stays with it until that manoeuvre is done. It used to come and go with the car's speed, so slowing for a turn dropped it and reset CarPlay's card.
  • CarPlay's manoeuvre state (continue, prepare, execute) only moves forward for a manoeuvre; slowing shortened the distances, which used to step it back.
  • Estimates go to CarPlay, and Android Auto's template is rebuilt, only when the distance or time as the car shows it changes (a tenth of a mile, ten yards, a minute), not on every fix.
  • Android Auto's pictures are drawn once a manoeuvre and kept, not drawn again for every update.
  • A short GPS gap or a quick reroute doesn't pause and resume the trip (the status holds through it).

Measured on a simulated 2.7-minute town drive at up to 50 mph with six turns, two pairs close together (sdk/swift/Tests/MeridianAtlasTests/CarPlayFlickerTests.swift and native/android/sdk/src/test/kotlin/dev/meridianatlas/android/AtlasCarFlickerTest.kt, the session's own updates, a fix and a tick a second, with 6 m GPS noise):

BeforeAfter
CarPlay: the card set again (upcomingManeuvers)15 (5.5 a minute)9 (3.3 a minute)
CarPlay: estimates sent321 (118 a minute)144 (53 a minute)
CarPlay: pauses and resumes1 and 1 (the start)1 and 1
Android Auto: template rebuilt159 (58.5 a minute)94 (34.6 a minute), each one a visible change
Phone banner: the card drawn again (ui/guidance-banner.ts bannerChange, 10 updates a second)600 a minute1.2 a minute, and the distance text 22 a minute

Speed limits and cameras

The car screens follow the same rules as the phone's panels (the SDK guide, conformance/speed-alerts-v1.json):

  • The sign is a road sign in the map's lower corner: white disc, regulatory red ring, the limit in black. Hidden where the limit isn't known. In km/h a UK 30 limit reads 48, as on the phone (it used to read a 50 that isn't the limit).
  • Over the limit, once it has held for a second, the speed shows beside the sign in Meridian's danger colour (#E8445A); it goes two seconds after the speed is back within the limit, or at once when the limit goes up. Nothing flashes, and the sign itself stays a sign. speedTolerance (0 to 10, 0 by default: Swift AtlasCarPlay.Options, Kotlin AtlasCar, AtlasCarScreen.configure, the presentation's unless you give one) is how far over the shown limit before it shows.
  • A lower limit ahead shows as a small sign with how far ("30 · 60 yd") in a small navy pill beside the sign, 12 seconds before the change at the car's speed.
  • Free drive gets the sign and over the limit too, from the road's limit where the car is.
  • The sign is drawn on the map, not in a template: its changes don't rebuild Android Auto's template or touch CarPlay's guidance card.
  • Camera alerts come from the car screen's own map: "Speed camera ahead", "Average speed check ahead" or "Red light camera ahead", with "In 300 yd · 30 mph limit", warned of at the same distance as on the phone. An average speed check is warned of at its first camera.
  • The app hears it (onSpeedAlert on AtlasCarPlay and AtlasCar, the speed_alert event on React Native's and Flutter's AtlasCarScreen), and the car screen's voice says each camera ("Speed camera ahead, 30 limit") once, even when the phone's map warned of it too, and plays the optional over-limit chime. The car plays both through its speakers with the app's speech; Atlas takes no audio focus and leaves the audio session as the app set it.

docs/sdk/screenshots/speed-alerts-carplay-sign-2026-12-02.png shows CarPlay's sign in each state, drawn at a car screen's 2× by the iOS app target's CarPlaySpeedSignTests.

Day and night

The car screen is dark when the car says, usually with its headlights, whatever the phone's map does:

  • CarPlay: the car's content style (CPTemplateApplicationScene.contentStyle when it connects, then contentStyleDidChange, which the ready-made scene delegates pass on; the car window's appearance says so too). The car screen's, dashboard's and instrument cluster's maps switch together, with the ground behind them and the trip estimates (CPMapTemplate.tripEstimateStyle). The guidance card keeps its colour (Meridian navy unless yours): it reads on a day map and stands off a night one, and CarPlay picks its text and the symbols' dark variant by it. The speed limit sign stays a white disc, as on the road.
  • Android Auto: CarContext.isDarkMode, and the session's onCarConfigurationChanged when it changes. The map, the ground behind it and the templates switch together; the map buttons' and the camera alert's icons are tinted by Android Auto (CarColor.DEFAULT) to read on its light and dark controls.

The map switches in place, as on the phone: no reload, and the route and camera stay as they were. Each loads on the same day ground or night surface as the phone's map view. With the car connected, the phone and the car may differ for a while at dusk (the phone goes by the sun or its own dark mode, the car by its light sensor): each is consistent in itself.

The wording

Each manoeuvre's forms, most to least verbose, for "At the roundabout, take the third exit onto East Lancashire Road (A580)":

FormText
The route's wording, as car screens print itAt the roundabout, take the 3rd exit onto East Lancashire Rd (A580)
The road, with its number3rd exit, A580 East Lancashire Rd
The road's name3rd exit, East Lancashire Rd
Its number3rd exit, A580
What to doTake the 3rd exit

A turn has the same forms without the exit ("A56 Deansgate", "Deansgate", "A56", "Turn left"). CarPlay's card leads with the longest that fits a line at the car screen's width; Android Auto shows the first that fits. The dashboard and instrument cluster get the same forms, and the road following the manoeuvre ("A580 East Lancashire Rd").

  • Abbreviations: only the word that ends a road's name, as Royal Mail and UK car screens write it (St, Rd, Ave, Ln, Dr, Pl, Sq, Cres, Cl, Ct, Gdns, Gr, Terr, Pde): "Booth St", "Whitworth St West", "Booth St car park". Never a name's first word ("Street Lane" is "Street Ln"), a word inside a name ("Hanger Lane Gyratory"), one after "The" ("The Street"), "Saint", or a place on a sign ("towards Liverpool Street Station"). A name in capitals keeps them ("LONDON RD").
  • Road numbers are never split or shortened: "A57(M)", "M6 Toll", "A1(M) J6". One road with two numbers ("B5158;B5214" in the map data) reads "B5158/B5214".
  • Welsh and English names: of a name given twice ("Heol y Frenhines / Queen Street"), the shorter forms keep the one the route gives first, with the number ("A4161 Heol y Frenhines").
  • Long names: the number when the road has one ("A6046" for "Lance Corporal Stephen Shaw M.C. Way"). Only when nothing naming the road fits, the name cut between words with an ellipsis, to about 32 and 20 characters ("Ffordd Cyswllt Ystad…", "Ffordd Cyswllt…"), and never to less than 8 characters.
  • Roundabouts: the road out, never the roundabout's own name ("Hole House Roundabout").
  • The voice says everything in full ("Street", "junction 19", "the A five-eighty", "the M six Toll").

conformance/road-name-wording-v1.json holds real UK names (and every road on 29 real routes) with what CarPlay, Android Auto, the phone banner and the voice make of each; all four are tested against it.

The SDKs hand the car screen each step's wording, exit number and sign, not its road name and number fields (map-host-wire-v1), so a turn's number shows only where the wording carries it (a roundabout's "East Lancashire Road (A580)" does; "Turn left onto Deansgate" doesn't).

Spoken guidance. The car screen shows guidance but says nothing unless you give it a voice:

  • Swift and Kotlin: set voice (an AtlasVoice) on AtlasCarPlay or AtlasCar. Each update you pass it then has its announcements said, and they stop when guidance ends. CarPlay and Android Auto play the app's navigation speech through the car.
  • Handing an update to the same voice yourself as well does no harm: an announcement already being said is said once.
  • React Native and Flutter: hand each update to an AtlasVoice as on the phone (each quickstart's "Speaking the guidance"). The speech reaches the car the same way.

iOS: CarPlay

What Apple needs

CarPlay apps need Apple's CarPlay navigation entitlement (com.apple.developer.carplay-maps). Apple grants it per app: request it from Apple for your bundle ID, then use a provisioning profile that includes it. The iOS Simulator's CarPlay window works without it, so you can build and test first.

Info.plist

Add the CarPlay scene, and the dashboard's and instrument cluster's if you want maps there, to your scene manifest. Each is connected for you by a ready-made scene delegate.

Scene roleScene classDelegate (Swift package)Delegate (React Native, Flutter)
CPTemplateApplicationSceneSessionRoleApplicationCPTemplateApplicationSceneAtlasCarPlaySceneDelegateMeridianAtlasCarPlaySceneDelegate
CPTemplateApplicationDashboardSceneSessionRoleApplicationCPTemplateApplicationDashboardSceneAtlasCarPlayDashboardSceneDelegateMeridianAtlasCarPlayDashboardSceneDelegate
CPTemplateApplicationInstrumentClusterSceneSessionRoleApplicationCPTemplateApplicationInstrumentClusterSceneAtlasCarPlayInstrumentClusterSceneDelegateMeridianAtlasCarPlayInstrumentClusterSceneDelegate

The dashboard also needs CPSupportsDashboardNavigationScene, and the instrument cluster CPSupportsInstrumentClusterNavigationScene (both YES). Add the location background mode (UIBackgroundModes) so guidance carries on with the phone locked.

XML
<key>UIApplicationSceneManifest</key>
<dict>
  <key>UIApplicationSupportsMultipleScenes</key>
  <true/>
  <key>UISceneConfigurations</key>
  <dict>
    <key>CPTemplateApplicationSceneSessionRoleApplication</key>
    <array>
      <dict>
        <key>UISceneConfigurationName</key>
        <string>CarPlay</string>
        <key>UISceneClassName</key>
        <string>CPTemplateApplicationScene</string>
        <key>UISceneDelegateClassName</key>
        <string>AtlasCarPlaySceneDelegate</string>
      </dict>
    </array>
  </dict>
</dict>

To add templates of your own (a destination search, say), write your own CarPlay scene delegate and call carPlay.connect(interfaceController, window:) from it. Then push your templates through carPlay.interfaceController, and put your buttons in carPlay.leadingNavigationBarButtons.

Swift

Make one AtlasCarPlay when the app starts. The ready-made delegates connect AtlasCarPlay.shared, the one made last.

Swift
let carPlay = AtlasCarPlay(configuration: atlas)
carPlay.onStartTrip = { trip in
    // The driver chose a route on the car screen: begin navigation along it, then show it.
    if case .route(let route) = trip { _ = try? navigation.begin(route.plan); carPlay.show(route) }
}
carPlay.onEndGuidance = { _ = try? navigation.stop() }
carPlay.onRetryReroute = { navigation.retryReroute() } // Retry on "Can't find a route"

carPlay.previewRoutes([quickest, shortest], destinationName: "Interact CC Wigan", destination: wigan)

// In your AtlasNavigation's onUpdate (any thread). After a reroute, show the new route first (the session
// reroutes by itself; route_replaced brings the new route), so the update and its "New route" are for it:
for effect in update.effects where effect.type == "route_replaced" { if let route = effect.route { carPlay.show(route) } }
carPlay.update(update)

The pieces:

  • A multi-stop trip: previewTrip(route, stopNames:) and show(route, stopNames:).
  • Free drive: show(position:), then update(freeDriveSnapshot).
  • The look: AtlasCarPlay.Options sets:
    • the guidance card's colour;
    • the car screen's map presentation;
    • the dashboard's and cluster's map presentations (2D at low quality unless you say);
    • the speed limit sign.

samples/ios-carplay is a working app: Sources/Drive.swift is everything it does for CarPlay.

React Native and Flutter

The plugins' native code holds the car screen. Configure it once, preview and show routes, and listen for the driver's choice:

TypeScript
import { NativeModules, NativeEventEmitter } from "react-native";
import { AtlasCarScreen } from "@meridianatlas/react-native";

const car = new AtlasCarScreen(NativeModules.MeridianAtlas, NativeEventEmitter);
await car.configure({ configuration: atlas });
car.onEvent((event) => {
  if (event.type === "start_trip") startGuidance(routes.find((route) => route.routeId === event.routeId));
  if (event.type === "end_guidance") navigation.stop();
});
await car.previewRoutes([quickest, shortest], { destinationName: "Interact CC Wigan" });
await car.showRoute(route); // when navigation begins, and after each reroute
Dart
final car = AtlasCarScreen();
await car.configure(configuration: atlas);
car.events.listen((event) {
  if (event is AtlasCarStartTrip) startGuidance(routes.firstWhere((route) => route.routeId == event.routeId));
  if (event is AtlasCarEndGuidance) navigation.stop();
});
await car.previewRoutes([quickest, shortest], destinationName: 'Interact CC Wigan');
await car.showRoute(route); // when navigation begins, and after each reroute

The same calls drive Android Auto on Android.

Android: Android Auto

Android Auto uses the Car App Library's navigation templates (androidx.car.app). Add it to your app: the Atlas SDK compiles against it without bringing it, so apps without Android Auto don't carry it.

Kotlin
dependencies {
    implementation("androidx.car.app:app:1.7.0")
}

Manifest

Declare the car app service with the navigation category and the car app metadata. The minimum Car App API level is 1 for the template; speed camera alerts use car API level 5, and fall back to a toast before it.

XML
<uses-permission android:name="androidx.car.app.NAVIGATION_TEMPLATES" />
<uses-permission android:name="androidx.car.app.ACCESS_SURFACE" />

<application>
    <meta-data android:name="com.google.android.gms.car.application"
               android:resource="@xml/automotive_app_desc" />
    <meta-data android:name="androidx.car.app.minCarApiLevel" android:value="1" />

    <service android:name=".NavigationCarAppService" android:exported="true">
        <intent-filter>
            <action android:name="androidx.car.app.CarAppService" />
            <category android:name="androidx.car.app.category.NAVIGATION" />
        </intent-filter>
    </service>
</application>

res/xml/automotive_app_desc.xml:

XML
<automotiveApp>
    <uses name="template" />
</automotiveApp>

React Native and Flutter apps name the plugin's service instead of their own: dev.meridianatlas.android.car.MeridianAtlasCarAppService.

  • Debug builds accept any Android Auto host.
  • Release builds accept the hosts in the Car App Library's allow-list. To name your own list, add meta-data dev.meridianatlas.car.hosts (an array resource) to the service.

Kotlin

Kotlin
val car = AtlasCar(configuration)
car.onStartTrip = { trip -> /* begin navigation along it, then car.show(route) */ }
car.onEndGuidance = { navigation.stop() }
car.onRetryReroute = { navigation.retryReroute() } // Retry on "Can't find a route"
car.previewRoutes(listOf(quickest, shortest), destinationName = "Interact CC Wigan")

// In your AtlasNavigationListener.onUpdate:
car.update(update)

class NavigationCarAppService : CarAppService() {
    override fun createHostValidator() =
        if (BuildConfig.DEBUG) HostValidator.ALLOW_ALL_HOSTS_VALIDATOR
        else HostValidator.Builder(this).addAllowedHosts(androidx.car.app.R.array.hosts_allowlist_sample).build()
    override fun onCreateSession() = (application as App).car.createSession()
}

How the map gets onto the car's surface:

  • The map: the Atlas map is a WebView. It draws on the surface Android Auto gives the app, through a Presentation on a virtual display. It logs its frame rate under the tag AtlasCar.
  • Insets: the car's visible area keeps the car out from under the guidance card.
  • Gestures: pans and pinches move the map.
  • Your own screens: to build your own car screens around the map, use car.controller. Its surfaceCallback(context) is the map surface.

Android Automotive OS

Android Automotive OS (the car's own Android, no phone) runs Car App Library navigation apps too. It needs:

  • the androidx.car.app:app-automotive artifact;
  • a separate APK or module with the automotive features declared;
  • the WebView, which is available on Android Automotive OS but not certified on every car.

It isn't part of this release.

Simulated drives (testing and app review)

AtlasRouteSimulator drives your navigation session along a route without moving:

  • at 1 to 10 times real speed;
  • keeping to the speed limits and slowing for turns;
  • with optional GPS noise of a chosen accuracy (seeded, so a run repeats).

It can also replay a recorded drive trace (conformance/navigation-drive-traces-v1.json's fix events). While it runs, the session takes only its fixes.

Turn it on only in debug builds and builds for app review:

Swift
#if DEBUG || ATLAS_REVIEW
let simulator = AtlasRouteSimulator(navigation: navigation, speedMultiplier: 4)
carPlay.simulator = simulator // a Simulate button on the car screen while guiding
#endif
Kotlin
if (BuildConfig.DEBUG || BuildConfig.ATLAS_REVIEW) {
    val simulator = AtlasRouteSimulator(navigation, speedMultiplier = 4.0)
    car.simulator = simulator // a Simulate action on the car screen, and Android Auto's AUTO_DRIVE
}

React Native and Flutter:

  • The drive: AtlasRouteSimulator (start, replay, stop).
  • The car screen's button: car.setSimulationEnabled(true).

For Google Play's reviewers

Google Play reviews navigation apps for Android Auto, and its reviewers must be able to drive a route without moving. Build the review build with the simulator on (ATLAS_REVIEW), and tell them how in the Play Console's app access instructions. For example:

text
Choose a destination and start navigation. On the car screen, tap Simulate
(or run: adb shell dumpsys activity service com.example.app/.NavigationCarAppService AUTO_DRIVE).
The car drives the route at 4x speed; tap Stop drive to stop.

The AUTO_DRIVE command is Android Auto's own test hook. Atlas answers it with the simulated drive when a simulator is set.

Testing

  • CarPlay: open the iOS Simulator's CarPlay window (I/O > External Displays > CarPlay) with your app running. Test in a car, or on an aftermarket CarPlay unit, before release (docs/CARPLAY_TEST_PLAN.md).
  • Android Auto: use the Desktop Head Unit from the Android SDK (extras/google/auto/desktop-head-unit). The phone or emulator needs the full Android Auto app, with its head unit server started from Android Auto's developer settings. Then run adb forward tcp:5277 tcp:5277 and start the head unit. Local testing needs no approval from Google.
  • The samples: both use a local demo service with fixed routes through Manchester. Run npm run build, then node scripts/carplay_demo_server.mjs (port 4310).
    • iOS: samples/ios-carplay (its README).
    • Android: the SDK sample's debug build has an Android Auto demo (native/android/sdk/sample/src/debug, CarDemo.kt). Run ./gradlew :sample:installDebug in native/android/sdk, then adb reverse tcp:4310 tcp:4310, then start the head unit. Choose a route and tap Go: the drive is simulated, and Stop drive and Simulate stop and restart it.
  • The car map off the car: native/android/map-perf's CarSurfaceActivity draws Android Auto's map surface into an image reader at a car screen's size, along a demo route. It counts the frames that reach the surface.
Proposal · draft