MediaRecorder cihazımda stop()
numaralı telefonu arayarak Samsung Galaxy Camera üzerinde süresiz olarak kilitleniyor. Bu aramayı ayrı bir iş parçacığına yerleştirmek, soruna da yardımcı olmaz.MediaRecorder.stop(), Samsung Galaxy Camera üzerinde kilitleniyor
Logcat herhangi bir hata mesajı gösterme. Ancak, bu aynı uygulamayı çalıştırmak Samsung Galaxy Nexus üzerinde herhangi bir sorun çıkarmaz.
Bu stop
için çağrıma çevreleyen kodudur: gördüm
View.OnClickListener captureListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
if (isRecording) {
// stop recording and release camera
mMediaRecorder.stop();
releaseMediaRecorder(); // release the MediaRecorder object
mCamera.lock(); // take camera access back from MediaRecorder
// inform the user that recording has stopped
captureButton.setText("Capture");
isRecording = false;
} else {
// initialize video camera
if (prepareVideoRecorder()) {
// Camera is available and unlocked, MediaRecorder is prepared,
// now you can start recording
mMediaRecorder.start();
// inform the user that recording has started
captureButton.setText("Stop");
isRecording = true;
} else {
// prepare didn't work, release the camera
releaseMediaRecorder();
// inform user
}
}
}
};