| java.lang.Object | |
| ↳ | android.media.MediaMetadata.Builder |
Use to build MediaMetadata objects. The system defined metadata keys must use the appropriate data type.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Create an empty Builder.
| |||||||||||
Create a Builder using a
MediaMetadata instance to set the
initial values.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a
MediaMetadata instance with the specified fields.
| |||||||||||
Put a
Bitmap into the metadata.
| |||||||||||
Put a long value into the metadata.
| |||||||||||
Put a
Rating into the metadata.
| |||||||||||
Put a String value into the metadata.
| |||||||||||
Put a CharSequence value into the metadata.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Create an empty Builder. Any field that should be included in the
MediaMetadata must be added.
Create a Builder using a MediaMetadata instance to set the
initial values. All fields in the source metadata will be included in
the new metadata. Fields can be overwritten by adding the same key.
Creates a MediaMetadata instance with the specified fields.
Put a Bitmap into the metadata. Custom keys may be used, but
if the METADATA_KEYs defined in this class are used they may only be
one of the following:
Large bitmaps may be scaled down by the system. To pass full
resolution images Uris should be used with
putString(String, String).
| key | The key for referencing this value |
|---|---|
| value | The Bitmap to store |
Put a long value into the metadata. Custom keys may be used, but if the METADATA_KEYs defined in this class are used they may only be one of the following:
| key | The key for referencing this value |
|---|---|
| value | The long value to store |
Put a Rating into the metadata. Custom keys may be used, but
if the METADATA_KEYs defined in this class are used they may only be
one of the following:
| key | The key for referencing this value |
|---|---|
| value | The Rating value to store |
Put a String value into the metadata. Custom keys may be used, but if the METADATA_KEYs defined in this class are used they may only be one of the following:
METADATA_KEY_TITLEMETADATA_KEY_ARTISTMETADATA_KEY_ALBUMMETADATA_KEY_AUTHORMETADATA_KEY_WRITERMETADATA_KEY_COMPOSERMETADATA_KEY_DATEMETADATA_KEY_GENREMETADATA_KEY_ALBUM_ARTISTMETADATA_KEY_ART_URIMETADATA_KEY_ALBUM_ART_URIMETADATA_KEY_DISPLAY_TITLEMETADATA_KEY_DISPLAY_SUBTITLEMETADATA_KEY_DISPLAY_DESCRIPTIONMETADATA_KEY_DISPLAY_ICON_URI
Uris for artwork should use the content:// style and support
EXTRA_SIZE for retrieving scaled artwork
through openTypedAssetFileDescriptor(Uri, String, Bundle).
| key | The key for referencing this value |
|---|---|
| value | The String value to store |
Put a CharSequence value into the metadata. Custom keys may be used, but if the METADATA_KEYs defined in this class are used they may only be one of the following:
METADATA_KEY_TITLEMETADATA_KEY_ARTISTMETADATA_KEY_ALBUMMETADATA_KEY_AUTHORMETADATA_KEY_WRITERMETADATA_KEY_COMPOSERMETADATA_KEY_DATEMETADATA_KEY_GENREMETADATA_KEY_ALBUM_ARTISTMETADATA_KEY_ART_URIMETADATA_KEY_ALBUM_ART_URIMETADATA_KEY_DISPLAY_TITLEMETADATA_KEY_DISPLAY_SUBTITLEMETADATA_KEY_DISPLAY_DESCRIPTIONMETADATA_KEY_DISPLAY_ICON_URI| key | The key for referencing this value |
|---|---|
| value | The CharSequence value to store |