I'm having trouble with the Play [song] on [app] command; specifically the "app" is not being recognised by Android Auto.
I get an audio speech message back: "Not sure how to help with play song on app"
So the speech recognition is working perfectly (as song and app are as I spoke), however either the matching to the app isn't working or it is not obvious to Auto that my app can handle this.
In the simulator, search works from the Search menu option so I'm assuming my intent filters are correct.
My Manifest has the following:
<!-- - - - - - - - - - - - - - - - - - - - - -->
<!-- Auto -->
<!-- - - - - - - - - - - - - - - - - - - - - -->
<meta-data android:name="com.google.android.gms.car.application" android:resource="@xml/automotive_app_desc"/>
<meta-data android:name="com.google.android.gms.car.notification.SmallIcon" android:resource="@drawable/brand_icon_white" />
<service android:name=".library.service.auto.MyMediaBrowserService"
android:exported="true">
<intent-filter>
<action android:name="android.media.browse.MediaBrowserService"/>
</intent-filter>
</service>
I have tried putting the following into my service declaration or an Activity as shown in the YouTube DevByte but neither seems to work:
<action android:name="android.media.action.MEDIA_PLAY_FROM_SEARCH" />
<category android:name="android.intent.category.DEFAULT" />
I would expect it to be in the Service as there are no Activities associated with the Service. I would like to know for sure where this should be.
I have probably missed something out or misunderstood something. One issue could be that the name of the application contains a number in it (eg. 1up).