When calling getPlaybackState().getPosition()
Luke Stevens
1

It should not be automatically updating. You’ll want to use getLastPositionUpdateTime() to know when the position was last updated and getPlaybackSpeed() (if relevant to your app) to know how fast the position is being updated.

Then you can simply do position + playbackSpeed * (System.currentTimeMillis() — lastPositionUpdateTime) to calculate the current time (probably something you’d do in a Handler that uses postDelayed() every ~second).

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.