Build a parking or charging app

This section details the different features of the library that you can make use of to implement the functionality of your parking or charging app.

Declare category support in your manifest

Your app needs to declare either the androidx.car.app.category.PARKING or androidx.car.app.category.CHARGING car app category in the intent filter of its CarAppService. For example:

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

Access the map template

Apps can access the PlaceListMapTemplate specifically designed for showing a list of points of interest alongside a map that is rendered by the host.

In order to get access to this template, your app needs to declare the androidx.car.app.MAP_TEMPLATES permission in its AndroidManifest.xml:

<uses-permission android:name="androidx.car.app.MAP_TEMPLATES"/>