2021年4月30日星期五

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 :

  • signed apk
  • reinstal/update phone android auto services
  • clear cache on phone for android auto service and play service ( ? )

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 ?

https://stackoverflow.com/questions/67295413/android-automotive-not-showing-my-app-on-car-screen April 28, 2021 at 03:09PM

没有评论:

发表评论