The stop() call on my MediaRecorder hangs endlessly on the Samsung Galaxy Camera. Placing this call in a separate thread does not help either.
Logcat does not display error messages. However, launching the same application does not cause any problems in the Samsung Galaxy Nexus.
This is the code surrounding my stop call:
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 } } } };
source share