Media Player start stop start

后端 未结 9 2095
死守一世寂寞
死守一世寂寞 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:33

    Hey please use following

    for stop -> media player mp.seekTo(0); mp.pause();

    again for start just call mp.start();

提交回复
热议问题