Hiding camera after it is opened

After I use this to open the device camera

media.capturePhoto( { listener=onComplete } )

how can I remove it automatically (programmaticly without pressing buttons on the camera interface)

First of all, you can’t. Its a native control and we are limited by what the operating system gives us to use.  Secondly why would you want to do this?  If the user hit the button to take the picture, they should be the one deciding when to take the photo or cancel if they choose not to.  Cancelling the form in the middle of what they are doing would be a bad user experience.   And auto taking of photos would be a bad thing as well.

Rob

Thanks Rob. The main reason for this was adding two object a camera view and a rectangle and by alternating the display the user could take a photo that would fit in the rectangle. I understand as the camera is a native view we cant put anything on top and was trying to make a work around.

First of all, you can’t. Its a native control and we are limited by what the operating system gives us to use.  Secondly why would you want to do this?  If the user hit the button to take the picture, they should be the one deciding when to take the photo or cancel if they choose not to.  Cancelling the form in the middle of what they are doing would be a bad user experience.   And auto taking of photos would be a bad thing as well.

Rob

Thanks Rob. The main reason for this was adding two object a camera view and a rectangle and by alternating the display the user could take a photo that would fit in the rectangle. I understand as the camera is a native view we cant put anything on top and was trying to make a work around.