MediaPlayer 액티비티가 있습니다. 자세한 LogCat 출력을 알아 채고 계속해서 반복되는 것을 보았을 때까지 작업을 마쳤다고 생각했습니다.MediaPlayer를 제대로 닫으십시오.
01-17 17:03:50.466: D/StatusBarPolicy(209): iconIndex=1
01-17 17:03:50.476: V/StatusBarPolicy(209): cdmaLevel:1;max:4
01-17 17:03:50.476: D/StatusBarPolicy(209): iconLevel:1
01-17 17:03:50.476: D/StatusBarService(209): updateIcon slot=phone_signal index=20 viewIndex=14 old=StatusBarIcon(pkg=com.android.systemui id=0x7f020007 level=0 visible=true num=0) icon=StatusBarIcon(pkg=com.android.systemui id=0x7f020008 level=0 visible=true num=0)
01-17 17:03:50.597: V/MediaPlayer(16768): getCurrentPosition
01-17 17:03:50.597: V/MediaPlayerService(82): getCurrentPosition
01-17 17:03:50.597: V/MediaPlayerService(82): [261] getCurrentPosition = 277943
01-17 17:03:50.597: V/MediaPlayerService(82): [261] isPlaying: 0
01-17 17:03:50.597: V/MediaPlayer(16768): isPlaying: 0
01-17 17:03:50.597: V/MediaPlayerService(82): [261] isPlaying: 0
01-17 17:03:50.597: V/MediaPlayer(16768): isPlaying: 0
01-17 17:03:50.847: V/MediaPlayer(16768): getCurrentPosition
01-17 17:03:50.847: V/MediaPlayerService(82): getCurrentPosition
01-17 17:03:50.847: V/MediaPlayerService(82): [261] getCurrentPosition = 277943'
이렇게하면 내 활동이 제대로 닫히지 않을 것 같습니다. 나는 그것을 위해 사용하고 코드는 앞의 코드는 사용자가 앱을 완전히 종료 후에도 반복 유지
cancelButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
new AlertDialog.Builder(CastrRecorder.this)
.setTitle("Close")
.setMessage("Any unsaved changes will be lost. Continue?")
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
Log.d("AlertDialog", "Positive");
mPlayer.stop();
mPlayer.release();
Intent baseIntent = new Intent(Recorder.this, Activity.class);
Recorder.this.startActivity(baseIntent);
}
})
.setNegativeButton("No", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
Log.d("AlertDialog", "Negative");
}
})
.show();
}
});
입니다. 나는 도울 수 없지만 그것이 나쁠 것이라고 생각합니다. 이것을 막기 위해 무엇을 할 수 있습니까?
문제가 해결되면 ... 해결되었습니다. LogCat은 쓰레기를 더 이상 배출하지 않습니다. – Carnivoris