Stay organized with collections
Save and categorize content based on your preferences.
TvView.TimeShiftPositionCallback
public
static
abstract
class
TvView.TimeShiftPositionCallback
extends Object
Callback used to receive time shift position changes.
Summary
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Public constructors
TimeShiftPositionCallback
public TimeShiftPositionCallback ()
Public methods
onTimeShiftCurrentPositionChanged
public void onTimeShiftCurrentPositionChanged (String inputId,
long timeMs)
This is called when the current position for time shifting has changed.
The current position for time shifting is the same as the current position of
playback. During playback, the current position changes continuously. When paused, it
does not change.
Note that timeMs
is wall-clock time.
Parameters |
inputId |
String : The ID of the TV input bound to this view. |
timeMs |
long : The current position for time shifting, in milliseconds since the epoch. |
onTimeShiftStartPositionChanged
public void onTimeShiftStartPositionChanged (String inputId,
long timeMs)
This is called when the start position for time shifting has changed.
The start position for time shifting indicates the earliest possible time the user can
seek to. Initially this is equivalent to the time when the underlying TV input starts
recording. Later it may be adjusted because there is insufficient space or the duration
of recording is limited. The application must not allow the user to seek to a position
earlier than the start position.
For playback of a recorded program initiated by TvView.timeShiftPlay(java.lang.String, android.net.Uri)
,
the start position is the time when playback starts. It does not change.
Parameters |
inputId |
String : The ID of the TV input bound to this view. |
timeMs |
long : The start position for time shifting, in milliseconds since the epoch. |
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,["# TvView.TimeShiftPositionCallback\n\nAdded in [API level 23](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Ctors](#pubctors) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nTvView.TimeShiftPositionCallback\n================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/media/tv/TvView.TimeShiftPositionCallback \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\nabstract\nclass\nTvView.TimeShiftPositionCallback\n`\n\n\n`\n\nextends `[Object](/reference/java/lang/Object)`\n\n\n`\n\n`\n\n\n`\n\n|---|---------------------------------------------------|\n| [java.lang.Object](/reference/java/lang/Object) ||\n| ↳ | android.media.tv.TvView.TimeShiftPositionCallback |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nCallback used to receive time shift position changes.\n\nSummary\n-------\n\n| ### Public constructors ||\n|-------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[TimeShiftPositionCallback](/reference/android/media/tv/TvView.TimeShiftPositionCallback#TimeShiftPositionCallback())`() ` |\n\n| ### Public methods ||\n|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` void` | ` `[onTimeShiftCurrentPositionChanged](/reference/android/media/tv/TvView.TimeShiftPositionCallback#onTimeShiftCurrentPositionChanged(java.lang.String,%20long))`(`[String](/reference/java/lang/String)` inputId, long timeMs) ` This is called when the current position for time shifting has changed. |\n| ` void` | ` `[onTimeShiftStartPositionChanged](/reference/android/media/tv/TvView.TimeShiftPositionCallback#onTimeShiftStartPositionChanged(java.lang.String,%20long))`(`[String](/reference/java/lang/String)` inputId, long timeMs) ` This is called when the start position for time shifting has changed. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](/reference/java/lang/Object)` ` |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](/reference/java/lang/Object) | ` `[clone](/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object. | | ` boolean` | ` `[equals](/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](/reference/java/lang/Object)` obj) ` Indicates whether some other object is \"equal to\" this one. | | ` void` | ` `[finalize](/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final `[Class](/reference/java/lang/Class)`\u003c?\u003e` | ` `[getClass](/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this `Object`. | | ` int` | ` `[hashCode](/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object. | | ` final void` | ` `[notify](/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` `[notifyAll](/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor. | | ` `[String](/reference/java/lang/String) | ` `[toString](/reference/java/lang/Object#toString())`() ` Returns a string representation of the object. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` `[wait](/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||\n\nPublic constructors\n-------------------\n\n### TimeShiftPositionCallback\n\n```\npublic TimeShiftPositionCallback ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### onTimeShiftCurrentPositionChanged\n\nAdded in [API level 23](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic void onTimeShiftCurrentPositionChanged (String inputId, \n long timeMs)\n```\n\nThis is called when the current position for time shifting has changed.\n\nThe current position for time shifting is the same as the current position of\nplayback. During playback, the current position changes continuously. When paused, it\ndoes not change.\n\nNote that `timeMs` is wall-clock time.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------|-----------------------------------------------------------------------------------------|\n| `inputId` | `String`: The ID of the TV input bound to this view. \u003cbr /\u003e |\n| `timeMs` | `long`: The current position for time shifting, in milliseconds since the epoch. \u003cbr /\u003e |\n\n### onTimeShiftStartPositionChanged\n\nAdded in [API level 23](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic void onTimeShiftStartPositionChanged (String inputId, \n long timeMs)\n```\n\nThis is called when the start position for time shifting has changed.\n\nThe start position for time shifting indicates the earliest possible time the user can\nseek to. Initially this is equivalent to the time when the underlying TV input starts\nrecording. Later it may be adjusted because there is insufficient space or the duration\nof recording is limited. The application must not allow the user to seek to a position\nearlier than the start position.\n\nFor playback of a recorded program initiated by [TvView.timeShiftPlay(java.lang.String, android.net.Uri)](/reference/android/media/tv/TvView#timeShiftPlay(java.lang.String,%20android.net.Uri)),\nthe start position is the time when playback starts. It does not change.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------|---------------------------------------------------------------------------------------|\n| `inputId` | `String`: The ID of the TV input bound to this view. \u003cbr /\u003e |\n| `timeMs` | `long`: The start position for time shifting, in milliseconds since the epoch. \u003cbr /\u003e |"]]