media icon indicating copy to clipboard operation
media copied to clipboard

Implement Custom Browse Actions with Media3 MediaLibraryService

Open icutvaric opened this issue 1 year ago • 4 comments

How can we implement same Custom Browse Actions described in here https://developer.android.com/training/cars/media#how_to_implement_custom_browse_actions with Media3 MediaLibraryService?

icutvaric avatar Jun 19 '24 11:06 icutvaric

We are in the process of adding this feature and we can use this issue to track this effort publicly. Unfortunately, we missed that Android Automotive published guidelines for this already without waiting for the Media3 implementation, so apologies for the feature gap.

tonihei avatar Jun 19 '24 12:06 tonihei

@tonihei From my reading about that feature it was for Android Automotive and not Android Auto.

Did you meant that or will this be supported on Android Auto too?

Tolriq avatar Jun 19 '24 14:06 Tolriq

@tonihei thanks for the clarification. Do you know approx. when can we expect this feature?

icutvaric avatar Jun 20 '24 09:06 icutvaric

Yes, I meant Automotive (fixed my post too). And we can't provide concrete timelines, but unfortunately it won't be part of the upcoming 1.4.0 release. We'll try to get it in as soon as possible afterwards.

tonihei avatar Jun 20 '24 10:06 tonihei

The Media3 API for this is documented now on DAC as part of the 1.5 release.

Custom browse actions declared by a legacy MediaBrowserServiceCompat are converted to command buttons for media items in Media3 and vice versa.

With the legacy library, this feature is only available to a MediaBrowserCompat. In Media3 this is a feature of the basic MediaSession and hence is available to MediaController and MediaBrowser in the same way and doesn't require a MediaLibraryService.

I'm closing this issue. Please file a new issue regarding the implementation if required.

marcbaechinger avatar Nov 27 '24 21:11 marcbaechinger