Android Auto上的EXTRA_IS_DOWNLOADED不起作用

时间:2018-12-20 12:59:50

标签: android android-auto

我想使用指示符来指示文件已下载。我像在文档中那样做,但这是唯一对我不起作用的指标。​​

String EXTRA_IS_DOWNLOADED = "android.media.extra.DOWNLOAD_STATUS";

Bundle extra = new Bundle();
extra.putString(CommonConstants.EXTRA, MEDIA_ID_NEW);
extra.putString(CONTENT_STYLE_GROUP_TITLE_HINT, CommonOperations.convertDateTypeToString(context, episode.getDateType(todayCalendar)));
extra.putLong(EXTRA_IS_DOWNLOADED, EXTRA_METADATA_ENABLED_VALUE);

MediaDescriptionCompat description = new MediaDescriptionCompat.Builder()
                    .setMediaId(episode.id)
                    .setExtras(extra)
                    .setTitle(episode.getTitle())
    .setSubtitle(episode.getPodcast().getCollectionName())
                        .setIconUri(Uri.parse(episode.getPodcast().getArtworkUrlSmall()))
                        .build();
res.add(new MediaBrowserCompat.MediaItem(description, MediaBrowserCompat.MediaItem.FLAG_PLAYABLE));

0 个答案:

没有答案