Android APIs
public static class

MediaDescription.Builder

extends Object
java.lang.Object
   ↳ android.media.MediaDescription.Builder

Class Overview

Builder for MediaDescription objects.

Summary

Public Constructors
MediaDescription.Builder()
Creates an initially empty builder.
Public Methods
MediaDescription build()
MediaDescription.Builder setDescription(CharSequence description)
Sets the description.
MediaDescription.Builder setExtras(Bundle extras)
Sets a bundle of extras.
MediaDescription.Builder setIconBitmap(Bitmap icon)
Sets the icon.
MediaDescription.Builder setIconUri(Uri iconUri)
Sets the icon uri.
MediaDescription.Builder setMediaId(String mediaId)
Sets the media id.
MediaDescription.Builder setSubtitle(CharSequence subtitle)
Sets the subtitle.
MediaDescription.Builder setTitle(CharSequence title)
Sets the title.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public MediaDescription.Builder ()

Added in API level 21

Creates an initially empty builder.

Public Methods

public MediaDescription build ()

Added in API level 21

public MediaDescription.Builder setDescription (CharSequence description)

Added in API level 21

Sets the description.

Parameters
description A description suitable for display to the user or null.
Returns
  • this

public MediaDescription.Builder setExtras (Bundle extras)

Added in API level 21

Sets a bundle of extras.

Parameters
extras The extras to include with this description or null.
Returns
  • this

public MediaDescription.Builder setIconBitmap (Bitmap icon)

Added in API level 21

Sets the icon.

Parameters
icon A Bitmap icon suitable for display to the user or null.
Returns
  • this

public MediaDescription.Builder setIconUri (Uri iconUri)

Added in API level 21

Sets the icon uri.

Parameters
iconUri A Uri for an icon suitable for display to the user or null.
Returns
  • this

public MediaDescription.Builder setMediaId (String mediaId)

Added in API level 21

Sets the media id.

Parameters
mediaId The unique id for the item or null.
Returns
  • this

public MediaDescription.Builder setSubtitle (CharSequence subtitle)

Added in API level 21

Sets the subtitle.

Parameters
subtitle A subtitle suitable for display to the user or null.
Returns
  • this

public MediaDescription.Builder setTitle (CharSequence title)

Added in API level 21

Sets the title.

Parameters
title A title suitable for display to the user or null.
Returns
  • this