BejanCorneliu
BejanCorneliu

Reputation: 65

Android automotive not showing my app on car screen

I'm developing for the first time on one of my app a feature for android auto.

In my manifest i have :

<service
    android:name="ro.test.auto.AutoService"
    android:enabled="true"
    android:exported="true">
      <intent-filter>
            <action android:name="android.media.browse.MediaBrowserService" />
            <action android:name="android.media.browse.MediaBrowserServiceCompat" />
      </intent-filter>
</service>


    <uses-feature
        android:name="android.hardware.type.automotive"
        android:required="true" />

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

and in my automotive_app_desc :

<?xml version="1.0" encoding="utf-8"?>
<automotiveApp>
    <uses name="media" />
</automotiveApp>

My service extends :

public class AutoService  extends MediaBrowserServiceCompat

For testing i user Polestar emulator and the app works as expected; The problem is when i pugin my phone to my car , my app does not apper on the screen

I try :

there is a delay or other method to follow for showing my app on my car android auto screen ?

Thanks,

L.E : using information from : https://developer.android.com/training/cars/testing#install-dhu-1.1 i tested on dhu. In first place did not work. But i figured that i had to replace

android:name="com.android.automotive"

with

android:name="com.google.android.gms.car.application" 

and my app start to run on the DHU

BUT : it still does not show up in my car android auto ; used both debug and release apk

any ideas ?

Upvotes: 1

Views: 2198

Answers (2)

Madan Ankapura
Madan Ankapura

Reputation: 61

There are 3 platforms

  1. Assistant Driving mode (for those cars that don't have screens)
  2. Android Auto (for those cars support Android Auto Projection, and DHU is your tool to test it)
  3. Android Automotive OS (for cars like Polestar where you can use Android Emulator to test).

The app that you developed for #2 is a phone app, where #3 is a standalone native AAOS app, and looking at your code sample you might be mixing the two (#2 & #3).

Please refer to https://developer.android.com/training/cars/media for instructions

Upvotes: 0

Wonil
Wonil

Reputation: 6727

Maybe, your app do not work in real car because it's not downloaded from Play Store. PTAL car app quality Android documentation.

Copied from the doc:

Important: Apps must meet the criteria listed in this page to qualify as an Android Auto or Android Automotive OS app on Google Play. Apps don't work with Android Auto unless they are installed from the Play Store.

Upvotes: 2

Related Questions