尝试停止视频录制时,Android活动不响应

时间:2014-06-11 04:26:19

标签: android mediarecorder

我已从某项活动开始录制视频。然后,我希望暂停我的活动,但在我恢复活动后尝试停止视频录制时,它不会做出响应。

public void recordVideo(View view)
{


Button videoRecordingButton = (Button)findViewById(R.id.videorecordingbutton);
Log.d("tag",String.valueOf(isRecording));
if(isRecording==false)
{
   cameraView.prepareVideoRecorder();
   mediaRecorder = cameraView.mMediaRecorder;
    mediaRecorder.start();

    isRecording = true;

videoRecordingButton.setText("Stop");

}
else
{
    Log.d("####","####before mediaRecorder.stop()");

    mediaRecorder.stop();
    Log.d("####","####after mediaRecorder.stop()");
    isRecording = false;
    videoRecordingButton.setText("Start");

}

0 个答案:

没有答案