Shailesh Saindane
Shailesh Saindane

Reputation: 11

How to set appCategory to poi for automotive projects in the manifest file using android studio

I wanted to know what is the appCategory required for POI based automotive apps as there is no specified appCategory mentioned in the developer documentation

I tried changing the appCategory to maps and CarAppService to POI as suggested in the developer documentation

Below is the manifest i'm using :

<application
    android:allowBackup="false"
    android:appCategory="maps"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:usesCleartextTraffic="true"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true">

    <meta-data
        android:name="com.android.automotive"
        android:resource="@xml/automotive_app_desc" />

    <meta-data
        android:name="androidx.car.app.minCarApiLevel"
        android:value="1" />

    <service
        android:name=".MyNavigationCarAppService"
        android:exported="true">
        <intent-filter>
            <action android:name="androidx.car.app.CarAppService" />
            <category android:name="androidx.car.app.category.POI" />
        </intent-filter>
    </service>l̥

    <activity
        android:name="androidx.car.app.activity.CarAppActivity"
        android:exported="true"
        android:label="@string/app_name"
        android:launchMode="singleTask"
        android:theme="@android:style/Theme.DeviceDefault.NoActionBar">

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

        <meta-data
            android:name="distractionOptimized"
            android:value="true" />

    </activity>

</application>

Dependencies used are:

implementation 'androidx.car.app:app:1.3.0-beta01'

implementation 'androidx.car.app:app-automotive:1.3.0-beta01'

Upvotes: 1

Views: 116

Answers (1)

Ben Sagmoe
Ben Sagmoe

Reputation: 1447

There is no required android:appCategory attribute value for POI apps. Only the intent filter androidx.car.app.category.POI that you already have is required to mark your app as a POI app.

Upvotes: 0

Related Questions