use of android.support.v4.media.MediaBrowserCompat.MediaItem in project AntennaPod by AntennaPod.
the class FeedMedia method getMediaItem.
/**
* Returns a MediaItem representing the FeedMedia object.
* This is used by the MediaBrowserService
*/
public MediaBrowserCompat.MediaItem getMediaItem() {
Playable p = this;
MediaDescriptionCompat description = new MediaDescriptionCompat.Builder().setMediaId(String.valueOf(id)).setTitle(p.getEpisodeTitle()).setDescription(p.getFeedTitle()).setSubtitle(p.getFeedTitle()).build();
return new MediaBrowserCompat.MediaItem(description, MediaBrowserCompat.MediaItem.FLAG_PLAYABLE);
}
Aggregations