FileDocCategorySizeDatePackage
MediaDescription.javaAPI DocAndroid 5.1 API7501Thu Mar 12 22:22:30 GMT 2015android.media

MediaDescription

public class MediaDescription extends Object implements android.os.Parcelable
A simple set of metadata for a media item suitable for display. This can be created using the Builder or retrieved from existing metadata using {@link MediaMetadata#getDescription()}.

Fields Summary
private final String
mMediaId
A unique persistent id for the content or null.
private final CharSequence
mTitle
A primary title suitable for display or null.
private final CharSequence
mSubtitle
A subtitle suitable for display or null.
private final CharSequence
mDescription
A description suitable for display or null.
private final android.graphics.Bitmap
mIcon
A bitmap icon suitable for display or null.
private final android.net.Uri
mIconUri
A Uri for an icon suitable for display or null.
private final android.os.Bundle
mExtras
Extras for opaque use by apps/system.
public static final Parcelable.Creator
CREATOR
Constructors Summary
private MediaDescription(String mediaId, CharSequence title, CharSequence subtitle, CharSequence description, android.graphics.Bitmap icon, android.net.Uri iconUri, android.os.Bundle extras)

        mMediaId = mediaId;
        mTitle = title;
        mSubtitle = subtitle;
        mDescription = description;
        mIcon = icon;
        mIconUri = iconUri;
        mExtras = extras;
    
private MediaDescription(android.os.Parcel in)

        mMediaId = in.readString();
        mTitle = in.readCharSequence();
        mSubtitle = in.readCharSequence();
        mDescription = in.readCharSequence();
        mIcon = in.readParcelable(null);
        mIconUri = in.readParcelable(null);
        mExtras = in.readBundle();
    
Methods Summary
public intdescribeContents()

        return 0;
    
public java.lang.CharSequencegetDescription()
Returns a description suitable for display or null.

return
A description or null.

        return mDescription;
    
public android.os.BundlegetExtras()
Returns any extras that were added to the description.

return
A bundle of extras or null.

        return mExtras;
    
public android.graphics.BitmapgetIconBitmap()
Returns a bitmap icon suitable for display or null.

return
An icon or null.

        return mIcon;
    
public android.net.UrigetIconUri()
Returns a Uri for an icon suitable for display or null.

return
An icon uri or null.

        return mIconUri;
    
public java.lang.StringgetMediaId()
Returns the media id or null. See {@link MediaMetadata#METADATA_KEY_MEDIA_ID}.

        return mMediaId;
    
public java.lang.CharSequencegetSubtitle()
Returns a subtitle suitable for display or null.

return
A subtitle or null.

        return mSubtitle;
    
public java.lang.CharSequencegetTitle()
Returns a title suitable for display or null.

return
A title or null.

        return mTitle;
    
public java.lang.StringtoString()

        return mTitle + ", " + mSubtitle + ", " + mDescription;
    
public voidwriteToParcel(android.os.Parcel dest, int flags)

        dest.writeString(mMediaId);
        dest.writeCharSequence(mTitle);
        dest.writeCharSequence(mSubtitle);
        dest.writeCharSequence(mDescription);
        dest.writeParcelable(mIcon, flags);
        dest.writeParcelable(mIconUri, flags);
        dest.writeBundle(mExtras);