Skip to content

Connectivity & Telephony

Projection on an AAOS vehicle

The confusing case: a car running Android Automotive that also hosts Android Auto or CarPlay. Two Androids, one screen, and the handover rules between them.

Intermediate5 minProjection · Android Auto · CarPlay

The foundations topic separated Android Auto from Android Automotive OS. Now the case that muddles them again: an AAOS vehicle that also supports Android Auto.

Both at once. On the same screen.

Why this exists at all#

What it looks like architecturally#

The projected session is, from AAOS's point of view, just another app.

The layering
AAOS (the vehicle's own Android)
 ├── native media app
 ├── native navigation
 ├── settings
 └── projection app       ← hosts the phone session
      └── the phone's UI, streamed in as pixels

The handover rules#

Two Androids competing for one screen and one set of speakers needs arbitration, and getting it wrong is very visible to the driver.

Audio focus is the mechanism. The projection app requests focus like any other app. When the phone plays music, the projection app holds media focus and the car's own media app pauses.

Vehicle functions always win. A reversing camera, a collision warning, a climate control interaction interrupts projection immediately. The car's own safety and vehicle-control surfaces are never subordinate to a projected session.

Navigation is the awkward one.

The wireless path#

Wireless projection uses a direct Wi-Fi link between phone and head unit, established over Bluetooth.

How a wireless session starts
1. Phone and head unit are paired over Bluetooth
2. Head unit uses BLE/Bluetooth to hand the phone Wi-Fi credentials
3. Phone joins a direct Wi-Fi link with the head unit
4. Video and audio stream over that link

What Android exposes#

CarProjectionManager, for a projection host app
val projection = car.getCarManager(Car.PROJECTION_SERVICE) as CarProjectionManager
 
projection.registerProjectionRunner(serviceIntent)
 
// Ask the platform to start the Wi-Fi access point for a wireless session
projection.startProjectionAccessPoint(callback)

This needs android.car.permission.CAR_PROJECTION — signature-level, because a projection host takes over the screen and audio. It is a system app, not something a third party ships.

Inspecting projection state
adb shell dumpsys car_service --services CarProjectionService
adb shell dumpsys media_session | grep -i projection
adb shell dumpsys wifi | grep -i -A5 'SoftAp\|p2p'

What this means if you build apps#

Common problems#

SymptomUsual cause
Projection will not startBluetooth pairing incomplete; Wi-Fi handover failed
Audio comes out of the wrong placeProjection app's audio context misconfigured
Car media does not resume afterProjection did not abandon audio focus
Phone navigation absent from clusterCluster message translation not implemented
Wireless session dropsWi-Fi radio contention with hotspot or scanning
Works with one phone, not anotherPhone-side implementation differences — build a phone matrix

Next#

Performance — starting with where all this data is stored.

References & further reading

Code links target the main branch on cs.android.com. AOSP moves — if a path 404s, search the symbol instead.