MediaDescription.Builder


public static class MediaDescription.Builder
extends Object

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


Builder for MediaDescription objects.

Summary

Public constructors

Builder()

Creates an initially empty builder.

Public methods

MediaDescription build()

Build MediaDescription.

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 setMediaUri(Uri mediaUri)

Sets the media uri.

MediaDescription.Builder setSubtitle(CharSequence subtitle)

Sets the subtitle.

MediaDescription.Builder setTitle(CharSequence title)

Sets the title.

Inherited methods

Public constructors

Builder

Added in API level 21
public Builder ()

Creates an initially empty builder.

Public methods

build

Added in API level 21
public MediaDescription build ()

Build MediaDescription.

Returns
MediaDescription a new media description.

setDescription

Added in API level 21
public MediaDescription.Builder setDescription (CharSequence description)

Sets the description.

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

Returns
MediaDescription.Builder this

setExtras

Added in API level 21
public MediaDescription.Builder setExtras (Bundle extras)

Sets a bundle of extras.

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

Returns
MediaDescription.Builder this

setIconBitmap

Added in API level 21
public MediaDescription.Builder setIconBitmap (Bitmap icon)

Sets the icon.

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

Returns
MediaDescription.Builder this

setIconUri

Added in API level 21
public MediaDescription.Builder setIconUri (Uri iconUri)

Sets the icon uri.

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

Returns
MediaDescription.Builder this

setMediaId

Added in API level 21
public MediaDescription.Builder setMediaId (String mediaId)

Sets the media id.

Parameters
mediaId String: The unique id for the item or null.

Returns
MediaDescription.Builder this

setMediaUri

Added in API level 23
public MediaDescription.Builder setMediaUri (Uri mediaUri)

Sets the media uri.

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

Returns
MediaDescription.Builder this

setSubtitle

Added in API level 21
public MediaDescription.Builder setSubtitle (CharSequence subtitle)

Sets the subtitle.

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

Returns
MediaDescription.Builder this

setTitle

Added in API level 21
public MediaDescription.Builder setTitle (CharSequence title)

Sets the title.

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

Returns
MediaDescription.Builder this