public final class

MediaDescriptionCompat.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.media3.session.legacy.MediaDescriptionCompat.Builder

Overview

Builder for MediaDescriptionCompat objects.

Summary

Constructors
publicBuilder()

Creates an initially empty builder.

Methods
public MediaDescriptionCompatbuild()

Creates a MediaDescriptionCompat instance with the specified fields.

public MediaDescriptionCompat.BuildersetDescription(java.lang.CharSequence description)

Sets the description.

public MediaDescriptionCompat.BuildersetExtras(Bundle extras)

Sets a bundle of extras.

public MediaDescriptionCompat.BuildersetIconBitmap(Bitmap icon)

Sets the icon.

public MediaDescriptionCompat.BuildersetIconUri(Uri iconUri)

Sets the icon uri.

public MediaDescriptionCompat.BuildersetMediaId(java.lang.String mediaId)

Sets the media id.

public MediaDescriptionCompat.BuildersetMediaUri(Uri mediaUri)

Sets the media uri.

public MediaDescriptionCompat.BuildersetSubtitle(java.lang.CharSequence subtitle)

Sets the subtitle.

public MediaDescriptionCompat.BuildersetTitle(java.lang.CharSequence title)

Sets the title.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Creates an initially empty builder.

Methods

public MediaDescriptionCompat.Builder setMediaId(java.lang.String mediaId)

Sets the media id.

Parameters:

mediaId: The unique id for the item or null.

Returns:

this

public MediaDescriptionCompat.Builder setTitle(java.lang.CharSequence title)

Sets the title.

Parameters:

title: A title suitable for display to the user or null.

Returns:

this

public MediaDescriptionCompat.Builder setSubtitle(java.lang.CharSequence subtitle)

Sets the subtitle.

Parameters:

subtitle: A subtitle suitable for display to the user or null.

Returns:

this

public MediaDescriptionCompat.Builder setDescription(java.lang.CharSequence description)

Sets the description.

Parameters:

description: A description suitable for display to the user or null.

Returns:

this

public MediaDescriptionCompat.Builder setIconBitmap(Bitmap icon)

Sets the icon.

Parameters:

icon: A Bitmap icon suitable for display to the user or null.

Returns:

this

public MediaDescriptionCompat.Builder setIconUri(Uri iconUri)

Sets the icon uri.

Parameters:

iconUri: A for an icon suitable for display to the user or null.

Returns:

this

public MediaDescriptionCompat.Builder setExtras(Bundle extras)

Sets a bundle of extras.

Parameters:

extras: The extras to include with this description or null.

Returns:

this

public MediaDescriptionCompat.Builder setMediaUri(Uri mediaUri)

Sets the media uri.

Parameters:

mediaUri: The content's for the item or null.

Returns:

this

public MediaDescriptionCompat build()

Creates a MediaDescriptionCompat instance with the specified fields.

Returns:

A MediaDescriptionCompat instance.