Skip navigation
Currently Being Moderated

[Flex Mobile] take photo without lauching Camera application.

Oct 10, 2013 9:37 PM

Hi there.

Is it possible to take photo without lauching Camera app?

Following source code must select PhotoApp when I click the button.  I wanna take a photo only using my app.

I've searched enough in Google. Please give me a hint.

Thanks in advanced.


<?xml version="1.0" encoding="utf-8"?>

<s:View xmlns:fx=""

           xmlns:s="library://" title="HomeView"






                private var camera:CameraUI;

                private var file:File;



                protected function view1_creationCompleteHandler(event:FlexEvent):void


                     // TODO Auto-generated method stub



                           camera = new CameraUI();

                           camera.addEventListener(MediaEvent.COMPLETE, onComplete);

                           camera.addEventListener(ErrorEvent.ERROR, onError);




                private function onError(event:ErrorEvent):void





                private function onComplete(event:MediaEvent):void


                     var mediaPromise:MediaPromise =;        



                private function captureImg(event:MouseEvent):void










     <s:Panel title="TakePhoto" width="90%" height="90%" top="5">

           <s:Button label="TakePhoto" click="captureImg()" />




  • Currently Being Moderated
    Oct 11, 2013 8:02 PM   in reply to havefreetime

    If you can have a video stream playing in your app, you should be able to select one of the frames of the video stream and save it as a jpg. I think it will be a bitmap object. This way you do not actually invoke the system camera.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points