Example usage for android.support.v4.media MediaMetadataCompat METADATA_KEY_DATE

List of usage examples for android.support.v4.media MediaMetadataCompat METADATA_KEY_DATE

Introduction

In this page you can find the example usage for android.support.v4.media MediaMetadataCompat METADATA_KEY_DATE.

Prototype

String METADATA_KEY_DATE

To view the source code for android.support.v4.media MediaMetadataCompat METADATA_KEY_DATE.

Click Source Link

Document

The date the media was created or published.

Usage

From source file:com.bayapps.android.robophish.model.MusicProvider.java

private MediaBrowserCompat.MediaItem createBrowsableMediaItemForShow(MediaMetadataCompat show,
        Resources resources) {// ww  w  .j a  v a2 s .co m

    String showId = show.getString(MediaMetadataCompat.METADATA_KEY_MEDIA_ID);
    String venue = show.getString(MediaMetadataCompat.METADATA_KEY_DISPLAY_TITLE);
    String location = show.getString(MediaMetadataCompat.METADATA_KEY_DISPLAY_SUBTITLE);
    String date = show.getString(MediaMetadataCompat.METADATA_KEY_DATE);

    MediaDescriptionCompat description = new MediaDescriptionCompat.Builder()
            .setMediaId(createMediaID(null, MEDIA_ID_TRACKS_BY_SHOW, showId)).setTitle(venue)
            .setSubtitle(resources.getString(R.string.browse_musics_by_genre_subtitle, date))
            .setDescription(location).build();
    return new MediaBrowserCompat.MediaItem(description, MediaBrowserCompat.MediaItem.FLAG_BROWSABLE);
}