最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Android Auto media browser not drawing root icons for Media3 app after January update - Stack Overflow

programmeradmin0浏览0评论

Since the January Android Auto update, which updated the main media browser screen, the media browser interface has stopped displaying the library root child icons - the icons at the very top of the browser screen. I'm developing a Media3-ExoPlayer-based media app, and am using the following code to assign an icon to the media items. This worked fine for both root items and "regular" media items until the January update; after the update, "regular" items have the icons displayed, but not the top root items - the root items just show a white outline of the clipping region of the icon image.

MediaMetadata metaData;
MediaMetadata.Builder metaDataBuilder;
MediaItem.Builder mediaItemBuilder;

metaDataBuilder = new MediaMetadata.Builder();
metaDataBuilder.setTitle("Favorites");
metaDataBuilder.setMediaType(MediaMetadata.MEDIA_TYPE_FOLDER_PLAYLISTS);
metaDataBuilder.setArtworkUri(Uri.parse("android.resource://" + getPackageName(this.getClass()) + "/" + R.drawable.playlist));
metaDataBuilder.setIsBrowsable(true);
metaDataBuilder.setIsPlayable(false);
metaData = metaDataBuilder.build();

mediaItemBuilder = new MediaItem.Builder();
mediaItemBuilder.setMediaMetadata(metaData);
mediaItemBuilder.setMediaId(listName);
mediaItem = mediaItemBuilder.build();

This is occurring with both the DHU (desktop head unit used during development), and on an actual car (Toyota Highlander). I've tried different image formats (png, xml) and with multiple screen resolutions, to no avail. Should I be doing something else, or is this a known bug with the Android Auto update?

发布评论

评论列表(0)

  1. 暂无评论