跪拜 Guibai
← All articles
Android · Android Jetpack · Kotlin

Remote Compose: AAOS Gets a Cross-App UI That Doesn't Suck

By 稀有猿诉 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

For any developer building on Android Automotive — whether at an OEM, a tier-1 supplier, or a third-party app team — cross-app UI embedding is a recurring source of complexity and technical debt. Remote Compose offers a genuinely new architectural pattern that could simplify ownership boundaries and reduce integration pain across the entire infotainment stack. The PoC shows it's not just theory; it works today alongside legacy systems.

Summary

Embedding one app's UI inside another on Android Automotive OS has always been a pain. Internal components force teams to become experts in every domain. TaskView burns through hardware overlay budgets. SurfaceControlViewHost introduces fragile IPC. And RemoteViews is too primitive for anything serious.

Remote Compose flips the model. Instead of sharing a surface, it shares a compact binary stream of drawing instructions. The host just plays them back on its own Canvas — no lifecycle coupling, no process knowledge needed. A PoC running a phone widget inside the CarLauncher shows it coexisting with native Views and CarTaskView in a three-column layout, with the provider on a separate display. The contract is minimal: the provider sends byte arrays, the host sends integer action IDs back.

The approach is pragmatic for OEMs. Remote Compose ships a View-based player artifact, so legacy View-system hosts like the standard CarLauncher can adopt it without migrating to Jetpack Compose. The provider side uses familiar Compose syntax with Remote-prefixed components. Android itself is baking a native player into API 35, but the AndroidX artifacts let teams adopt it today on older OS versions.

Still, Remote Compose is alpha-grade. Debugging tools don't work well, accessibility support is limited, and rotary navigation handling is incomplete. But for the core problem — sharing rich UI across app boundaries without tight coupling — it's the first approach that genuinely breaks the trade-off cycle.

Takeaways
Remote Compose serializes UI intent into a compact binary stream of Canvas drawing instructions, not a shared surface or process.
The host renders the stream on its own Canvas, with no knowledge of the provider's lifecycle, process state, or permissions.
The contract between host and provider is minimal: bytes in (UI descriptions), integers out (user actions).
A PoC embeds a phone widget in the CarLauncher using Remote Compose, running alongside native Views and CarTaskView in a three-column layout.
The provider runs on a separate display context, yet the host UI remains smooth and responsive.
Remote Compose ships two player artifacts: remote-player-compose for Jetpack Compose hosts, and remote-player-view for legacy View-based hosts.
The PoC uses AIDL as the transport layer, but the format is transport-agnostic (ContentProvider, BroadcastReceiver, WebSocket are also possible).
Android is baking a native Remote Compose player into API 35, but the AndroidX artifacts allow adoption on older OS versions today.
Animations work via expressions embedded in the document (e.g., ContinuousSec() * 360), evaluated locally on each frame with no IPC round trips.
The approach is still alpha: API surface is unstable, debugging tools are limited, accessibility support is incomplete, and rotary navigation handling is missing.
Conclusions

The shift from sharing surfaces to sharing intent is the key architectural insight — it decouples UI rendering from business logic at a fundamental level.

The PoC's coexistence with legacy Views and CarTaskView is more important than the Remote Compose implementation itself; it proves a viable migration path for OEMs with massive existing codebases.

Baking a native player into API 35 is a strong signal that Google sees this as the future for cross-app UI in Automotive, but the AndroidX artifacts are the pragmatic choice for real-world adoption today.

The minimal contract (bytes in, integers out) is elegant because it forces clean separation by design — teams can't accidentally couple through shared state or lifecycle hooks.

The accessibility limitations are a real concern for production use, especially in automotive where regulatory compliance (CVAA) is mandatory. This shifts the burden to the host in ways that may recreate the complexity Remote Compose aims to eliminate.

The alpha status and lack of debugging tools mean early adopters will need to invest in custom instrumentation — a non-trivial cost that OEMs should factor into their evaluation.

Concepts & terms
Remote Compose
A Jetpack library that serializes Compose UI into a compact binary stream of drawing instructions. The host receives and renders this stream on its own Canvas, without needing to know the provider's lifecycle, process, or permissions.
AAOS (Android Automotive OS)
Google's operating system for in-vehicle infotainment systems. It runs Android apps natively and supports multi-display setups for driver, passenger, and rear-seat screens.
CarTaskView
A system-level Android component that embeds another app's full Activity into the host's window hierarchy. It requires privileged permissions and adds a dedicated SurfaceFlinger layer, consuming hardware overlay budget.
SurfaceControlViewHost
An Android API that allows one app to embed another app's surface into its own window. It avoids privileged permissions but introduces fragile IPC boundaries and requires complex workarounds for structural changes and crash handling.
RemoteViews
An Android API for displaying a limited set of UI components (TextViews, ImageViews, Buttons) from another app. It requires no special permissions but is too primitive for complex UIs.
MUMD (Multi-User Multi-Display)
An AAOS configuration where multiple users and multiple displays (e.g., driver, passenger, rear seats) operate simultaneously, placing high demand on hardware resources like the Hardware Composer's overlay layers.
AIDL (Android Interface Definition Language)
A language for defining the interface between a client and a service in Android, enabling inter-process communication (IPC). In the PoC, it's used as the transport layer for Remote Compose documents.
Hardware Composer
A hardware abstraction layer in Android that manages the composition of multiple UI layers into a single frame for display. It has a limited budget of overlay layers; exceeding it causes performance degradation.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗