I want to use front and back Camera of device both at same time. In my app, first half of the screen will display preview of back camera and next half of the screen will display front camera preview.
I have tried this with setting two different camera previews but when I open my app, first half of the screen(which displays back camera preview) does not display the preview. And second half of the screen(which displays front facing Camera) displays back facing Camera(strange).
According to Camera.open(int) documentation:
Your application should only have one Camera object active at a time for a particular hardware camera.
This means if both camera hardware (front and back) are different and can be opened at same time.
In my application, I am using the same above api. This does not give any exception or error when I open and call Camera.startPreview();
for both cameras at same time. But still it is not working. I can see only one camera preview at a time.
Is there anything which I am missing here to use both cameras at same time?
I got simultaneous dual camera access working on the HTC ONE M8
Video: http://youtu.be/lt8N1Lpa9Zw
Feel free to use my code from here: https://bitbucket.org/jens_grubert/androiddualcameracapture/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With