How to resume the mediaplayer?

Prateek Raj picture Prateek Raj · Oct 4, 2010 · Viewed 47.1k times · Source

I am using a media player.

I have the option for starting ,stopping and pausing the player. The problem I have is that I cannot find the option to resume the song from the point that it previously was paused..

Any help provide would be really helpful.

Answer

Prateek Raj picture Prateek Raj · Oct 11, 2010

Thank you for your attention but I've got it myself

for pausing the Mediaplayer I used:

Mediaplayer.pause();
length=Mediaplayer.getCurrentPosition();

and for resuming the player from the position where it stopped lately is done by:

Mediaplayer.seekTo(length);
Mediaplayer.start();