Skip to main content
Inspiring
January 13, 2015
Question

AIR 16 Camera breaks app ( Works fine in AIR 15 ) - [HELP]

  • January 13, 2015
  • 1 reply
  • 1044 views

Everything worked fine in AIR 15 .. As soon as I switch to 16 .. If I open the camera image picker for iOS .. even if I just choose "Cancel". The app freezes and is not responding anymore.

Has anyone seen this or know of a fix ?

Here is what I am doing

// =================================================================================

// initCamera

// =================================================================================

  function initCamera(evt:Event):void{

                      

  endTouchX = mouseX;

  endTouchY = mouseY;

  if (startTouchX - endTouchX < 25 && startTouchX - endTouchX >-25 && startTouchY - endTouchY < 25 && startTouchY - endTouchY >-25) {

  takePhotoBTN.alpha = 1;

  trace("Starting Camera");

                      

     if( CameraUI.isSupported )

                        {

  showTransitionPanel();

                                cameraUI.addEventListener(MediaEvent.COMPLETE, imageSelected);

                                cameraUI.addEventListener(Event.CANCEL, browseCancelled);

                                cameraUI.addEventListener(ErrorEvent.ERROR, mediaError);

                              

                                cameraUI.launch(MediaType.IMAGE);

   

     clearGrid();

                        }

                        else

                        {

                                mainScreen.feedbackText.text = "Camera not supported.";

                        }

               

  }

  }     

              

              

              

                // =================================================================================

                // initCameraRoll

                // =================================================================================

                function initCameraRoll(evt:Event):void

                {

                       

  endTouchX = mouseX;

  endTouchY = mouseY;

  if (startTouchX - endTouchX < 25 && startTouchX - endTouchX >-25 && startTouchY - endTouchY < 25 && startTouchY - endTouchY >-25) {

  importPhotoBTN.alpha = 1;

  trace("Opening Camera Roll");

                      

                        if(CameraRoll.supportsBrowseForImage)

                        {

                               

  showTransitionPanel();

 

                              

                                // Add event listeners for camera roll events

                                cameraRoll.addEventListener(MediaEvent.SELECT, imageSelected);

                                cameraRoll.addEventListener(Event.CANCEL, browseCancelled);

                                cameraRoll.addEventListener(ErrorEvent.ERROR, mediaError);

                              

     // Open up the camera roll

                                cameraRoll.browseForImage();

   

  clearGrid();

                               

                        }

                        else

                        {

                                mainScreen.feedbackText.text = "Camera not supported.";

                        }

  }

                }

This topic has been closed for replies.

1 reply

Applauz78Author
Inspiring
January 13, 2015

I can confirm that is is   cameraRoll.browseForImage();  that breaks the app.  As soon as this is called... it looks like it suspends everything in the app .. and doesnt resume when its cancelled or an image is selected.

Pahup
Adobe Employee
Adobe Employee
January 13, 2015

Hi,

Thanks for reporting the issue. The issue is known to us for iPad and we're investigating it. For iPhone, the issue existed in beta builds for AIR 16, but it should get fixed when AIR 16 gets released.

Thanks

-Pahup

Adobe AIR

Applauz78Author
Inspiring
January 13, 2015

Any timeline on AIR 16 release date ?