MediaMetadata.Builder

public static final class MediaMetadata.Builder
extends Object

java.lang.Object
   ↳ androidx.media2.common.MediaMetadata.Builder


Use to build MediaMetadatax objects. The system defined metadata keys must use the appropriate data type.

Summary

Public constructors

Builder()

Create an empty Builder.

Builder(MediaMetadata source)

Create a Builder using a MediaMetadata instance to set the initial values.

Public methods

MediaMetadata build()

Creates a MediaMetadata instance with the specified fields.

MediaMetadata.Builder putBitmap(String key, Bitmap value)

Put a Bitmap into the metadata.

MediaMetadata.Builder putFloat(String key, float value)

Put a float value into the metadata.

MediaMetadata.Builder putLong(String key, long value)

Put a long value into the metadata.

MediaMetadata.Builder putRating(String key, Rating value)

Put a Rating into the metadata.

MediaMetadata.Builder putString(String key, String value)

Put a String value into the metadata.

MediaMetadata.Builder putText(String key, CharSequence value)

Put a CharSequence value into the metadata.

MediaMetadata.Builder setExtras(Bundle extras)

Set a bundle of extras.

Inherited methods