How to Use Front and Back Camera at Same Time in Android

Is it possible to use front and back Camera at same time in Android

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/

Access both back and front cameras simultaneously

The Android camera APIs generally allow multiple cameras to be used at the same time, but most devices do not have enough hardware resources to support that in practice - for example, there's often only one camera image processor shared by both cameras.

There's no query that's included in the Android APIs that'll tell you up front if you can use multiple cameras at the same time.

The only way to tell is to try to open a second camera when you already have one open. If you can open the second camera, then you can do picture-in-picture, etc. If you get an exception trying to open the second camera, then that particular device doesn't support having both cameras open.

Accessing Front and Back Camera in Android at the same time

From the documentation:

Your application should only have one Camera object active at a time.

The camera module is switched to either the front or back-facing camera. There is no design to launch both of them at the same time. HTC has confirmed this here. Sorry.



Related Topics



Leave a reply



Submit