android / car-samples

Multiple samples showing best practices for car app development on both Android Auto and Android Automotive OS.
Apache License 2.0
352 stars 163 forks source link

URGENT: UNABLE to detect Navigation App in Android Auto #13

Closed Android-AutoErrors closed 3 years ago

Android-AutoErrors commented 3 years ago

UNABLE to detect navigation app in Android Auto

We are working on a Navigation application and are facing problems in getting navigation app detected in Android Auto

Below you will see:

a) Libraries we used b) Android Manifest file c) automative app desc file code for Android auto d) Different solutions we tried but didn't work

For the same we have followed the given documentation: https://developer.android.com/training/cars/navigation

a) We have used the given libraries (To check the working with both) implementation “androidx.car.app:app:1.0.0” implementation "androidx.car.app:app:1.0.0-rc01"

Now the issue we are currently facing is the detection of app in Android Auto (The android auto along with the desktop head unit for testing are both updated to the latest version)

b) Here is how the Android Manifest file looks:- <service android:name=".AndroidAuto.HelloWorldService" android:exported="true">

    </service>

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

c) Further the automative app desc file code for Android auto is:-

d) Now I would like to point out couple of things:-

  1. The name="template" is not supported we have to add tools:ignore="InvalidUsesTagAttribute"
  2. The multiple combination so tried includes:-

i) Simple changing template to - media/sms/notifcation (Still not detected in android auto) ii) Further on changing the service's name to Messaging or Media and keeping template as the name in xml file the app is still not detected in android auto iii) Now the only case the app was detected in android auto was when I switched the category to Media/Messaging in intent filter of service and keeping the automotiveApp tag name as media/sms/notifications.

So the combination in iii) point although detected by android auto doesnt fit requirement of Navigation App.

In conclusion the setup for Android Manifest and XML file are working fine and are getting detected by android auto in case of Media/Messaging app refernece taken from: https://developer.android.com/training/cars/messaging

But on the same website content of the given files present in document for Navigation: https://developer.android.com/training/cars/navigation is not working.

Please guide us on what changes needs to be done in order to fix the same.

Android-AutoErrors commented 3 years ago

Hi, I have resolved the