We have created an application to record display and camera simultaneously. The application should be used to examine user behavior on mobile devices. Unfortunately the App crashes when recording is started.
We assume that this happens because the mobile does not support multiple instances of MediaRecorder (Samsung Note 4).
Has anyone tested which devices support that?
Does anyone know a different approach to record both simultaneously?
I'm developing the exact same thing.
In order to use several MediaRecorder
, we used a service with its own process.
Here is an extract of our AndroidManifest.xml
<!-- The screen recording has to happen in a separate process because it's not possible to
use multiple MediaRecorder instances in the same process. And Android does not seem to
like if it's tried to capture a camera in a separate process. -->
<service
android:name=".ScreenRecordingService"
android:process=":screenrecorder" />
<service android:name=".CameraRecordingService" />