MetadataEditor
open classMetadataEditor: MediaMetadataEditor
kotlin.Any | ||
↳ | android.media.MediaMetadataEditor | |
↳ | android.media.RemoteControlClient.MetadataEditor |
Class used to modify metadata in a RemoteControlClient
object. Use RemoteControlClient.editMetadata(boolean)
to create an instance of an editor, on which you set the metadata for the RemoteControlClient instance. Once all the information has been set, use apply()
to make it the new metadata that should be displayed for the associated client. Once the metadata has been "applied", you cannot reuse this instance of the MetadataEditor.
Summary
Constants | |
---|---|
static Int |
The metadata key for the content artwork / album art. |
Inherited constants | |
---|---|
Public methods | |
---|---|
open Unit |
apply() Associates all the metadata that has been set since the MetadataEditor instance was created with |
open Unit |
clear() Clears all the metadata that has been set since the MetadataEditor instance was created (with |
open RemoteControlClient.MetadataEditor! |
Sets the album / artwork picture to be displayed on the remote control. |
open RemoteControlClient.MetadataEditor! |
Adds numerical information to be displayed. |
open RemoteControlClient.MetadataEditor! | |
open RemoteControlClient.MetadataEditor! |
Adds textual information to be displayed. |
Inherited functions | |
---|---|
Constants
BITMAP_KEY_ARTWORK
static valBITMAP_KEY_ARTWORK: Int
Deprecated: Deprecated in Java.
The metadata key for the content artwork / album art.
Value: 100
Public methods
apply
open funapply(): Unit
Deprecated: Deprecated in Java.
Associates all the metadata that has been set since the MetadataEditor instance was created with RemoteControlClient.editMetadata(boolean)
, or since clear()
was called, with the RemoteControlClient. Once "applied", this MetadataEditor cannot be reused to edit the RemoteControlClient's metadata.
clear
open funclear(): Unit
Deprecated: Deprecated in Java.
Clears all the metadata that has been set since the MetadataEditor instance was created (with RemoteControlClient.editMetadata(boolean)
). Note that clearing the metadata doesn't reset the editable keys (use MediaMetadataEditor.removeEditableKeys()
instead).
putBitmap
open funputBitmap(
key: Int,
bitmap: Bitmap!
): RemoteControlClient.MetadataEditor!
Deprecated: Deprecated in Java.
Sets the album / artwork picture to be displayed on the remote control.
Parameters | |
---|---|
key |
Int: the identifier of the bitmap to set. The only valid value is BITMAP_KEY_ARTWORK |
bitmap |
Bitmap!: The bitmap for the artwork, or null if there isn't any. |
Return | |
---|---|
RemoteControlClient.MetadataEditor! |
Returns a reference to the same MetadataEditor object, so you can chain put calls together. |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
See Also
putLong
open funputLong(
key: Int,
value: Long
): RemoteControlClient.MetadataEditor!
Deprecated: Deprecated in Java.
Adds numerical information to be displayed. Note that none of the information added after apply()
has been called, will be displayed.
Parameters | |
---|---|
key |
Int: the identifier of a the metadata field to set. Valid values are android.media.MediaMetadataRetriever#METADATA_KEY_CD_TRACK_NUMBER , android.media.MediaMetadataRetriever#METADATA_KEY_DISC_NUMBER , android.media.MediaMetadataRetriever#METADATA_KEY_DURATION (with a value expressed in milliseconds), android.media.MediaMetadataRetriever#METADATA_KEY_YEAR . |
value |
Long: The long value for the given key |
Return | |
---|---|
RemoteControlClient.MetadataEditor! |
Returns a reference to the same MetadataEditor object, so you can chain put calls together. |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
putObject
open funputObject(
key: Int,
object: Any!
): RemoteControlClient.MetadataEditor!
Deprecated: Deprecated in Java.
Parameters | |
---|---|
key |
Int: the identifier of a the metadata field to set. Valid keys for a:
|
value |
the metadata to add. |
Return | |
---|---|
RemoteControlClient.MetadataEditor! |
Returns a reference to the same MediaMetadataEditor object, so you can chain put calls together. |
Exceptions | |
---|---|
java.lang.IllegalArgumentException |
putString
open funputString(
key: Int,
value: String!
): RemoteControlClient.MetadataEditor!
Deprecated: Deprecated in Java.
Adds textual information to be displayed. Note that none of the information added after apply()
has been called, will be displayed.
Parameters | |
---|---|
key |
Int: The identifier of a the metadata field to set. Valid values are android.media.MediaMetadataRetriever#METADATA_KEY_ALBUM , android.media.MediaMetadataRetriever#METADATA_KEY_ALBUMARTIST , android.media.MediaMetadataRetriever#METADATA_KEY_TITLE , android.media.MediaMetadataRetriever#METADATA_KEY_ARTIST , android.media.MediaMetadataRetriever#METADATA_KEY_AUTHOR , android.media.MediaMetadataRetriever#METADATA_KEY_COMPILATION , android.media.MediaMetadataRetriever#METADATA_KEY_COMPOSER , android.media.MediaMetadataRetriever#METADATA_KEY_DATE , android.media.MediaMetadataRetriever#METADATA_KEY_GENRE , android.media.MediaMetadataRetriever#METADATA_KEY_TITLE , android.media.MediaMetadataRetriever#METADATA_KEY_WRITER . |
value |
String!: The text for the given key, or null to signify there is no valid information for the field. |
Return | |
---|---|
RemoteControlClient.MetadataEditor! |
Returns a reference to the same MetadataEditor object, so you can chain put calls together. |