CarPlay & Android Auto with .NET MAUI
Your .NET MAUI app can project a purpose-built interface onto a vehicle’s infotainment screen — same solution, same shared services, same DI container. This post walks through the full implementation for both CarPlay and Android Auto, using two real apps as examples: a GPS trip recorder with live map drawing, and a speech-driven game.
What you’ll learn
- How CarPlay scene delegates work: entitlements,
Info.plistscene manifests, and theCPInterfaceControllerlifecycle - How to access MAUI’s DI container from CarPlay code via
IPlatformApplication.Current!.Services - CarPlay template types in practice:
CPInformationTemplatefor data display,CPGridTemplatefor actions, andMKMapViewfor live maps - Android Auto setup:
CarAppService,Session,Screen, and theInvalidate()re-render pattern - How to share ViewModels between the phone UI and the car UI using scoped DI and
PropertyChangedsubscriptions - Testing with the iOS Simulator CarPlay window and the Android Desktop Head Unit emulator