a negative value if the current playback position (or the last valid playback position) is not known, or a zero or positive value expressed in ms indicating the current position, or the last valid known position.
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.OnGetPlaybackPositionListener\n\nAdded in [API level 18](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\nOnGetPlaybackPositionListener\n=============================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/RemoteControlClient.OnGetPlaybackPositionListener \"View this page in Java\") \n\n```\ninterface OnGetPlaybackPositionListener\n```\n\n|----------------------------------------------------------------------|\n| [android.media.RemoteControlClient.OnGetPlaybackPositionListener](#) |\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 the media playback position is queried.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | [onGetPlaybackPosition](#onGetPlaybackPosition())`()` Called on the implementer of the interface to query the current playback position. |\n\nPublic methods\n--------------\n\n### onGetPlaybackPosition\n\nAdded in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onGetPlaybackPosition(): Long\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nCalled on the implementer of the interface to query the current playback position.\n\n| Return ||\n|------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | a negative value if the current playback position (or the last valid playback position) is not known, or a zero or positive value expressed in ms indicating the current position, or the last valid known position. |"]]