我想使用指示符来指示文件已下载。我像在文档中那样做,但这是唯一对我不起作用的指标。
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));