Skip to content

Android setup

GitHub

Android car support uses AndroidX Car App Library and a templated CarAppService.

The plugin ships the service declaration, template capability, and a default Android Auto category so the host can discover it after sync.

The plugin contributes this native service:

<service
android:name="app.capgo.auto.AutoCarAppService"
android:exported="true">
<intent-filter>
<action android:name="androidx.car.app.CarAppService" />
<category android:name="androidx.car.app.category.IOT" />
</intent-filter>
</service>

It also includes:

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

The default category is IOT. Your app must qualify for that category before publishing.

If your app belongs to another Android Auto category, override the service declaration in your app manifest and use the category required by Google for your use case.

Terminal window
npx cap sync android
  • setRootTemplate updates the Android Auto list screen.
  • Android Auto row selection emits carAction to JavaScript.
  • Sections are flattened on Android Auto; row title, subtitle, id, and payload are preserved.
  • Debug builds allow all hosts; release builds use AndroidX’s sample host allowlist.

Android Auto does not render your Capacitor WebView. The car host renders approved templates from the AndroidX Car App Library.

If you are using Android setup to plan native plugin work, connect it with Using @capgo/capacitor-auto for the native capability in Using @capgo/capacitor-auto, Capgo Plugin Directory for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, Adding or Updating Plugins for the implementation detail in Adding or Updating Plugins, and Ionic Enterprise Plugin Alternatives for the product workflow in Ionic Enterprise Plugin Alternatives.