I am trying to show a browsable list in the android automotive media application.
Inside MediaBrowserService, I tried :
mediaItems.add(new MediaBrowserCompat.MediaItem(
new MediaDescriptionCompat.Builder()
.setMediaId(my_id)
.setTitle("my_title")
.setIconBitmap(BitmapFactory.decodeResource(getResources(),
R.drawable.ic_myIcon))
.build(), MediaBrowserCompat.MediaItem.FLAG_BROWSABLE));
I also tried below :
mediaItems.add(new MediaBrowserCompat.MediaItem(
new MediaDescriptionCompat.Builder()
.setMediaId(
my_id )
.setTitle("my_title")
.setIconUri(my_uri)
.build(), MediaBrowserCompat.MediaItem.FLAG_BROWSABLE));
But I am not able to see my icon in the list. Can anyone help me out please?