0

I am testing preview and recording use cases in Android. The camera preview is running for few seconds and getting terminated by itself (without pressing back button). I want to test continuous preview, is it possible to achieve this?

How to set the maximum duration of the media recorder? Could you please direct me to any resource which shows how to do that?

Thanks in advance.

kumarharsh
  • 18,961
  • 8
  • 72
  • 100
stackuser
  • 629
  • 8
  • 19
  • What does "getting terminated by itself" mean? Is it crashing? If so, you should figure out why that is by looking at the logcat output or attaching a debugger. – fadden Jul 24 '14 at 15:45
  • @fadden: Thank you. Am facing a crash and board reboots. I will look into the crash dump. – stackuser Jul 28 '14 at 05:55

1 Answers1

2
MediaRecorder recorder;

recorder.setMaxDuration(10000); 
hanaa
  • 385
  • 6
  • 30