7

I'm trying to make an app that takes a picture using the front and the rear camera in one picture.

This is kinda how it would look.

enter image description here

I've read http://developer.android.com/reference/android/hardware/Camera.html and searched and really couldn't find anything on the subject but I know I saw on the app store of other apps like this.

user3242728
  • 87
  • 1
  • 3

1 Answers1

6

Mostly it depends on the hardware of the device and most of the devices now do not allow use of both cameras simultaneously. Even if some device will be able to use both cameras, if you want to make application that runs flawlessly on as much devices as possible (and this is what you want) you should not implement this solution. Google says:

In order for your application to be compatible with more devices, you should not make assumptions about the device camera specifications

What you can do, and it depends on the application you are writing is to periodically take pictures once with the front camera and the second time with the back camera.

MikeL
  • 5,385
  • 42
  • 41
  • I see this app has it done https://play.google.com/store/apps/details?id=com.behind.the.camera&hl=en If I do that I want the final image to come out like the picture i made in the first post. – user3242728 Feb 14 '14 at 17:24
  • @user3242728, I did not download the app you mentioned above but from a close look at the description of the app I found this line: "...This dual camera app captures photos with front- and back camera. They are triggered shortly one after the other..." – MikeL Feb 14 '14 at 21:04
  • Yes but what I'm trying to do is have that happen but show the front camera as well as the rear camera and have the output to be like the image i posted above. – user3242728 Feb 14 '14 at 21:35
  • Even if there will be a device that will enable you to lock both cameras and do what you want, regretfully it will not be possible for the majority of the devices. I needed to do a similar thing in my app for the camera prank but ended up doing a switch between two cameras: [Scary Pranks](https://play.google.com/store/apps/details?id=com.muchoapps.HalloweenPranks) – MikeL Feb 14 '14 at 21:55