Search code examples
androidkotlingoogle-playandroid-auto

Android auto APP not showing in pyshical device (is not listed in Android Auto app list) but works fine in DHU


I currently have an app on the Play Store and have created a version for Android Auto.

The Android Auto version works correctly on the DHU (Desktop Head Unit).

To test it on a real device (vehicle), I have created an Internal Test in Play Store, and in it, I have added the original app together with the Android auto bundle.

When I install it from the Play Store, the app does not appear in the list of available for Android Auto.

I suppose it has to do with the configuration of my "manifest" files, but I don't see where the error could be.

Has anyone had the same problem?

--- CODES UPDATED AFTER FIRST ANSWER -----

This is the "manifest" of the Android Auto app.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="net.recursoseducativos.programameudis_auto">
    <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="32" />
   <application
        android:allowBackup="true"
        android:appCategory="maps"
        android:icon="@mipmap/ic_launcher"
        android:label="Prográmame-udis"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.Prográmameudis" >
    <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="1"/>


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

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="androidx.car.app.MAP_TEMPLATES"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.hardware.location.network" />
    <uses-permission android:name="android.hardware.location.gps" />
    <queries>
        <package android:name="com.google.android.apps.maps" />
    </queries>

    <uses-feature android:name="android.hardware.wifi" android:required="false"/>
    <uses-feature android:name="android.hardware.screen.portrait" android:required="false"/>
    <uses-feature android:name="android.hardware.screen.landscape" android:required="false"/>
    <uses-feature android:name="android.hardware.camera" android:required="false"/>
</manifest>

automotive_app_desc.xml

   <?xml version="1.0" encoding="utf-8"?>
    <automotiveApp xmlns:tools="http://schemas.android.com/tools">
    <uses name="template" />
    </automotiveApp>

And here is the "manifest" of the phone app (original app)

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.example.programame_udis">

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


    <uses-permission android:name="android.permission.CAMERA" />
    <uses-feature android:name="android.permission.CAMERA" android:required="false"/>


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


        <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
                android:maxSdkVersion="28" />




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


    <queries>
        <intent>
            <action android:name="android.media.action.IMAGE_CAPTURE" />
        </intent>
    </queries>

    <application
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:roundIcon="@mipmap/ic_launcher_round"
            android:supportsRtl="true"
            android:theme="@style/AppTheme">


        <activity android:name="net.recursoseducativos.programame_udis.canvas_manuscrito"
                android:exported="true"
                android:theme="@style/Theme.AppCompat.Translucent"
                />
        <activity
                android:name="net.recursoseducativos.programame_udis.axenda_parte"
                android:exported="true"
                android:theme="@style/Theme.AppCompat.Translucent" />
        <activity
                android:name=".aplicacion.alumnado_parte"
                android:exported="true"
                android:theme="@style/Theme.AppCompat.Translucent" />
        <activity
                android:name=".aplicacion.diario_parte"
                android:exported="true"
                android:theme="@style/Theme.AppCompat.Translucent" />
        <activity
                android:name=".aplicacion.partes_udi"
                android:exported="true"
                android:theme="@style/Theme.AppCompat.Translucent" />
        <activity
                android:name=".aplicacion.arquivos"
                android:exported="true"
                android:theme="@style/Theme.AppCompat.Translucent" />
        <activity
                android:name=".aplicacion.configuracion"
                android:exported="true"
                android:theme="@style/Theme.AppCompat.Translucent" />
        <activity
                android:name="com.canhub.cropper.CropImageActivity"
                android:exported="true"
                android:theme="@style/Base.Theme.AppCompat" />

        <activity
                android:name=".aplicacion.cabecera_elector"
                android:exported="true"
                android:theme="@style/Theme.AppCompat.Translucent" />
        <activity android:name=".barcodescanner.lector_qr_camara"
                android:exported="true"
                />

        <activity android:name=".aplicacion.axenda"
                android:exported="true"
                />
        <activity
                android:name=".aplicacion.alumnado"
                android:windowSoftInputMode="stateVisible"
                android:exported="true"
                />

        <activity android:name=".aplicacion.diario"
                android:exported="true"
                />

        <activity android:name=".aplicacion.aplicacion"
                android:exported="true"
                />

        <activity android:name=".login.MainActivity"
                android:theme="@style/SplashTheme"
                android:background="@color/negro"
                android:exported="true"
                >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

        <receiver android:name="net.recursoseducativos.programame_udis.AlarmBroadcastReceiver" />
    </application>

</manifest>

I have tested with and without <uses-permission and uses-feature in the Android Auto app, but ever the same result, no way to launch it in the car, because is not available in the android auto list.

Thanks in advance.


Solution

  • Can you add the contents of the automotive_app_desc.xml file? Also, you should declare the minimum Car App API level as a <meta-data> element in the manifest.