MediaItemMetadata.java revision 3d4c9459ed77f732dd3ba602713af6ebf9280c8c
1/* 2 * Copyright (C) 2013 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package android.support.v7.media; 18 19import android.os.Bundle; 20 21/** 22 * Constants for specifying metadata about a media item as a {@link Bundle}. 23 * <p> 24 * Media item metadata is described as a bundle of key/value pairs as defined 25 * in this class. The documentation specifies the type of value associated 26 * with each key. 27 * </p><p> 28 * An application may specify additional custom metadata keys but there is no guarantee 29 * that they will be recognized by the destination. 30 * </p> 31 */ 32public final class MediaItemMetadata { 33 /* 34 * Note: MediaMetadataRetriever also defines a collection of metadata keys that can be 35 * retrieved from a content stream although the representation is somewhat different here 36 * since we are sending the data to a remote endpoint. 37 */ 38 39 private MediaItemMetadata() { 40 } 41 42 /** 43 * String key: Album artist name. 44 * <p> 45 * The value is a string suitable for display. 46 * </p> 47 */ 48 public static final String KEY_ALBUM_ARTIST = "android.media.metadata.ALBUM_ARTIST"; 49 50 /** 51 * String key: Album title. 52 * <p> 53 * The value is a string suitable for display. 54 * </p> 55 */ 56 public static final String KEY_ALBUM_TITLE = "android.media.metadata.ALBUM_TITLE"; 57 58 /** 59 * String key: Artwork Uri. 60 * <p> 61 * The value is a string URI for an image file associated with the media item, 62 * such as album or cover art. 63 * </p> 64 */ 65 public static final String KEY_ARTWORK_URI = "android.media.metadata.ARTWORK_URI"; 66 67 /** 68 * String key: Artist name. 69 * <p> 70 * The value is a string suitable for display. 71 * </p> 72 */ 73 public static final String KEY_ARTIST = "android.media.metadata.ARTIST"; 74 75 /** 76 * String key: Author name. 77 * <p> 78 * The value is a string suitable for display. 79 * </p> 80 */ 81 public static final String KEY_AUTHOR = "android.media.metadata.AUTHOR"; 82 83 /** 84 * String key: Composer name. 85 * <p> 86 * The value is a string suitable for display. 87 * </p> 88 */ 89 public static final String KEY_COMPOSER = "android.media.metadata.COMPOSER"; 90 91 /** 92 * String key: Track title. 93 * <p> 94 * The value is a string suitable for display. 95 * </p> 96 */ 97 public static final String KEY_TITLE = "android.media.metadata.TITLE"; 98 99 /** 100 * Integer key: Year of publication. 101 * <p> 102 * The value is an integer year number. 103 * </p> 104 */ 105 public static final String KEY_YEAR = "android.media.metadata.YEAR"; 106 107 /** 108 * Integer key: Track number (such as a track on a CD). 109 * <p> 110 * The value is a one-based integer track number. 111 * </p> 112 */ 113 public static final String KEY_TRACK_NUMBER = "android.media.metadata.TRACK_NUMBER"; 114 115 /** 116 * Integer key: Disc number within a collection. 117 * <p> 118 * The value is a one-based integer disc number. 119 * </p> 120 */ 121 public static final String KEY_DISC_NUMBER = "android.media.metadata.DISC_NUMBER"; 122} 123