Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I think you should go through the documentation found here: <a href="http://developer.android.com/reference/android/media/MediaPlayer.html" rel="noreferrer">http://developer.android.com/reference/android/media/MediaPlayer.html</a></p> <p>Some quotes from the docs:</p> <blockquote> <p>Playback can be paused and stopped, and the current playback position can be adjusted. Playback can be paused via pause(). When the call to pause() returns, the MediaPlayer object enters the Paused state. Note that the transition from the Started state to the Paused state and vice versa happens asynchronously in the player engine. It may take some time before the state is updated in calls to isPlaying(), and it can be a number of seconds in the case of streamed content. </p> <ul> <li>Calling start() to resume playback for a paused MediaPlayer object, and the resumed playback position is the same as where it was paused. When the call to start() returns, the paused MediaPlayer object goes back to the Started state.</li> <li>Calling pause() has no effect on a MediaPlayer object that is already in the Paused state.</li> </ul> </blockquote> <p>States explained:</p> <p><img src="https://i.stack.imgur.com/JwWnQ.gif" alt="States of MediaPlayer"></p> <p>And quote from the start() method of the MediaPlayer</p> <blockquote> <p>public void start ()</p> <p>Starts or resumes playback. If playback had previously been paused, playback will continue from where it was paused. If playback had been stopped, or never started before, playback will start at the beginning.</p> </blockquote> <p>So to answer your question directly, to resume the paused MediaPlayer instance from the point where it was paused use start() again on that instance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload