abstractfun onMetadataUpdate( key:Int, newValue:Any! ): Unit
Deprecated: Deprecated in Java.
Called on the implementer to notify that the metadata field for the given key has been updated to the new value.
Parameters
key
Int: the identifier of the updated metadata field.
newValue
Any!: the Object storing the new value for the key.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# RemoteControlClient.OnMetadataUpdateListener\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnMetadataUpdateListener\n========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/RemoteControlClient.OnMetadataUpdateListener \"View this page in Java\") \n\n```\ninterface OnMetadataUpdateListener\n```\n\n|-----------------------------------------------------------------|\n| [android.media.RemoteControlClient.OnMetadataUpdateListener](#) |\n\n*** ** * ** ***\n\n| **This interface was deprecated in API level 29.**\n|\n| Deprecated in Java.\n\nInterface definition for a callback to be invoked when one of the metadata values has been updated. Implement this interface to receive metadata updates after registering your listener through [RemoteControlClient.setMetadataUpdateListener(OnMetadataUpdateListener)](/reference/kotlin/android/media/RemoteControlClient#setMetadataUpdateListener(android.media.RemoteControlClient.OnMetadataUpdateListener)).\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onMetadataUpdate](#onMetadataUpdate(kotlin.Int,%20kotlin.Any))`(`key:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `newValue:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!`)` Called on the implementer to notify that the metadata field for the given key has been updated to the new value. |\n\nPublic methods\n--------------\n\n### onMetadataUpdate\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onMetadataUpdate(\n key: Int, \n newValue: Any!\n): Unit\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nCalled on the implementer to notify that the metadata field for the given key has been updated to the new value.\n\n| Parameters ||\n|------------|----------------------------------------------------------------------------------------------------------------------------|\n| `key` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the identifier of the updated metadata field. |\n| `newValue` | [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)!: the Object storing the new value for the key. |"]]