2

I have open camera preview for many times in surface view..but this time it is really challenging.I have to show front and back camera in same time in one surface view..I have no idea how to deal with this .

Please guide me..any tutorial will be very helpful for me..I am showing the preview which I have to do with front and back cameras

the back camera in upper part and front camera in lower part

userAndroid
  • 586
  • 2
  • 9
  • 26

1 Answers1

0

Like described in the API:

Your application should only have one Camera object active at a time for a particular hardware camera.

here:

http://developer.android.com/reference/android/hardware/Camera.html#open%28%29

So, it is not possible and not recommended to use two camera objects at the same time.

Alex Cohn
  • 56,089
  • 9
  • 113
  • 307
Opiatefuchs
  • 9,800
  • 2
  • 36
  • 49
  • thanks for your quick replay,it means that I am unable to achieve my goal..I have tried a lot to release first camera before using the second one but it is not useful..if you have any suggestion then pls guide me.. – userAndroid Jun 24 '14 at 05:37
  • The quote is correct, but the interpretation is wrong. The official document carefully uses the words not to restrict the case when a device has more than one hardware cameras, please see http://stackoverflow.com/a/25144412/192373. – Alex Cohn Dec 02 '15 at 09:56