更新时间:2023-10-20 12:42:46
当您单击后退,应用程序不断在后台运行。 如果要停止音乐任何时候你走出了一定的活动覆盖的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
}