Stay organized with collections
Save and categorize content based on your preferences.
RemoteControlClient.OnGetPlaybackPositionListener
public
static
interface
RemoteControlClient.OnGetPlaybackPositionListener
android.media.RemoteControlClient.OnGetPlaybackPositionListener
|
Interface definition for a callback to be invoked when the media playback position is
queried.
Summary
Public methods |
abstract
long
|
onGetPlaybackPosition()
Called on the implementer of the interface to query the current playback position.
|
Public methods
onGetPlaybackPosition
public abstract long onGetPlaybackPosition ()
Called on the implementer of the interface to query the current playback position.
Returns |
long |
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# RemoteControlClient.OnGetPlaybackPositionListener\n\nAdded in [API level 18](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nDeprecated in [API level\n29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nRemoteControlClient.OnGetPlaybackPositionListener\n=================================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/media/RemoteControlClient.OnGetPlaybackPositionListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nRemoteControlClient.OnGetPlaybackPositionListener\n`\n\n\n`\n\n\n`\n\n|-----------------------------------------------------------------|\n| android.media.RemoteControlClient.OnGetPlaybackPositionListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface definition for a callback to be invoked when the media playback position is\nqueried. \n**See also:**\n\n- [RemoteControlClient.FLAG_KEY_MEDIA_POSITION_UPDATE](/reference/android/media/RemoteControlClient#FLAG_KEY_MEDIA_POSITION_UPDATE)\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract long` | ` `[onGetPlaybackPosition](/reference/android/media/RemoteControlClient.OnGetPlaybackPositionListener#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](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract long onGetPlaybackPosition ()\n```\n\nCalled on the implementer of the interface to query the current playback position.\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `long` | 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. \u003cbr /\u003e |"]]