Media Player start stop start

后端 未结 9 2132
死守一世寂寞
死守一世寂寞 2020-12-10 13:09

I am making a new android sound application. I made a clickable button to play sound when I click on it. But I also want it to stop playing sound when I click for the second

9条回答
  •  情深已故
    2020-12-10 13:19

    I am using this code to play a sound from the beginning while playing or not.

    mp.seekTo(0);
    mp.start();
    

提交回复
热议问题