I'm developing an android application which requires to have 2 video recordings at the same time. I have my first MediaRecorder object starts a recording at 0 seconds. Then, I want my second MediaRecorder object to starts recording at 18 seconds. Finally, the first recorder will stop at the 20th seconds. Between 18 and 20 seconds, I will have 2 recoding instances.
However, the app crashes upon the start method (recorder.start()) execution of the second MediaRecorder object. I have been trying the find a work around for 2 days.
Any help will be greatly appreciated. Thanks
The behaviour for multiple instances of MediaRecorder is unspecified afaik and may or may not work depending on the device.
The documentation doesn't mention whether multiple instances are supported:
http://developer.android.com/reference/android/media/MediaRecorder.html
There are complaints about crashes when instantiating more than one instance:
Maximum number of simultaneous MediaRecorder instances on android?
Android: Two instances of Media recorder at same time
If the device can is capable of recording two video streams simultaneously, then it may work. But afaik this is not part of CTS.