更新时间:2022-05-28 01:17:53
当您单击返回时,应用程序会继续在后台运行.如果您想在退出某个活动时随时停止播放音乐,请覆盖 onStop 或 onPause 以停止您的声音.类似的东西
When you click back, the app keeps on running in the background. If you want to stop the music any time you get out of a certain activity override onStop or onPause to stop your sound. Something like that
@Override
protected void onStop(){
super.onStop();
//your code for stopping the sound
}