androidandroid-autoandroid-automotive

Android Auto - CarAppService not showing on car


I am developing an app where I am supposed to render a grid of icons, now the problem is that in the DHU it displays correctly and works, while in the auto it does not display. This is my manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">
    <uses-permission
        android:name="androidx.car.app.NAVIGATION_TEMPLATES" />

    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />

    <uses-permission
        android:name="android.permission.POST_NOTIFICATIONS" />

    <uses-permission
        android:name="android.permission.INTERNET"
        android:required="true" />

    <uses-permission
        android:name="android.permission.READ_MEDIA_VIDEO"
        android:required="true"/>

    <uses-permission
        android:name="android.permission.READ_MEDIA_AUDIO"
        android:required="true"/>

    <uses-permission
        android:name="android.permission.READ_EXTERNAL_STORAGE"
        android:required="true"/>

    <uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY"
        android:required="true"/>



    <application
        android:icon="@mipmap/icon"
        android:label="@string/app_name"
        android:appCategory="audio">

        <meta-data
            android:name="com.google.android.gms.car.application"
            android:resource="@xml/automotive_app_desc" />

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

        <meta-data
            android:name="androidx.car.app.CarAppMetadataHolderService.CAR_APP_SERVICE"
            android:value=".CarMainService" />

        <service
            android:name=".CarMainService"
            android:exported="true"
            android:icon="@mipmap/auto"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="androidx.car.app.CarAppService" />
                <category android:name="androidx.car.app.category.NAVIGATION"/>
            </intent-filter>
        </service>
        <receiver
            android:name="androidx.media.session.MediaButtonReceiver"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MEDIA_BUTTON" />
            </intent-filter>
        </receiver>
    </application>
</manifest>

Instead, these are the dependencies: enter image description here

I expect CarAppService to be displayed in the android auto menu


Solution

  • Apps built using the Car App Library are only available for use on real head units when distributed via the Play Store or another trusted source: https://developer.android.com/training/cars/testing#real-vehicles