How to resume the mediaplayer?

后端 未结 6 1987
不知归路
不知归路 2020-12-01 02:17

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 fr

6条回答
  •  感情败类
    2020-12-01 02:56

    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();
    

提交回复
热议问题