MediaItemMetadata.java revision 28520a15611522424b52cf88e4a2dbeb1a9be42b
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.graphics.Bitmap; 20import android.os.Bundle; 21 22/** 23 * Constants for specifying metadata about a media item as a {@link Bundle}. 24 */ 25public final class MediaItemMetadata { 26 /* 27 * Note: MediaMetadataRetriever also defines a collection of metadata keys that can be 28 * retrieved from a content stream although the representation is somewhat different here 29 * since we are sending the data to a remote endpoint. 30 */ 31 32 private MediaItemMetadata() { 33 } 34 35 /** 36 * Metadata key: Album artist name. 37 * <p> 38 * The value is a string suitable for display. 39 * </p> 40 */ 41 public static final String KEY_ALBUM_ARTIST = "ALBUM_ARTIST"; 42 43 /** 44 * Metadata key: Album title. 45 * <p> 46 * The value is a string suitable for display. 47 * </p> 48 */ 49 public static final String KEY_ALBUM_TITLE = "ALBUM_TITLE"; 50 51 /** 52 * Metadata key: Artwork Uri. 53 * <p> 54 * The value is a string URI for an image file associated with the media item, 55 * such as album or cover art. 56 * </p> 57 * 58 * @see #KEY_ARTWORK_BITMAP 59 */ 60 public static final String KEY_ARTWORK_URI = "ARTWORK_URI"; 61 62 /** 63 * Metadata key: Artwork Bitmap. 64 * <p> 65 * The value is a {@link Bitmap} for an image file associated with the media item, 66 * such as album or cover art. 67 * </p><p> 68 * Because bitmaps can be large, use {@link #KEY_ARTWORK_URI} instead if the artwork can 69 * be downloaded from the network. 70 * </p> 71 * 72 * @see #KEY_ARTWORK_URI 73 */ 74 public static final String KEY_ARTWORK_BITMAP = "ARTWORK_BITMAP"; 75 76 /** 77 * Metadata key: Artist name. 78 * <p> 79 * The value is a string suitable for display. 80 * </p> 81 */ 82 public static final String KEY_ARTIST = "ARTIST"; 83 84 /** 85 * Metadata key: Author name. 86 * <p> 87 * The value is a string suitable for display. 88 * </p> 89 */ 90 public static final String KEY_AUTHOR = "AUTHOR"; 91 92 /** 93 * Metadata key: Composer name. 94 * <p> 95 * The value is a string suitable for display. 96 * </p> 97 */ 98 public static final String KEY_COMPOSER = "COMPOSER"; 99 100 /** 101 * Metadata key: Track title. 102 * <p> 103 * The value is a string suitable for display. 104 * </p> 105 */ 106 public static final String KEY_TITLE = "TITLE"; 107 108 /** 109 * Metadata key: Year of publication. 110 * <p> 111 * The value is an integer year number. 112 * </p> 113 */ 114 public static final String KEY_YEAR = "YEAR"; 115 116 /** 117 * Metadata key: Track number (such as a track on a CD). 118 * <p> 119 * The value is a one-based integer track number. 120 * </p> 121 */ 122 public static final String KEY_TRACK_NUMBER = "TRACK_NUMBER"; 123 124 /** 125 * Metadata key: Disc number within a collection. 126 * <p> 127 * The value is a one-based integer disc number. 128 * </p> 129 */ 130 public static final String KEY_DISC_NUMBER = "DISC_NUMBER"; 131} 132