Copy link to clipboard
Copied
Hi,
My Air App crash since i update to AIR 22 (beta of 2016/05/11) when i call myCameraRoll.browseForImage() on iPad.
It worked before, so i don't think an example to reproduce it will be useful...
I hoped that crash would be fixed as the CameraUI one, but it not..
Please fix, and forgive my english !
Alexandre.
Hi,
We tried to reproduce the issue in iOS 9.3.1 device but it did not.
Please let us know which version of AIR 22 beta you are using? Can you try with the latest one : 22.0.0.137 from here: Download Adobe AIR 22 Beta - Adobe Labs
-Roshan
Copy link to clipboard
Copied
Hi,
The bug mentioned in the beta release note is for CameraUI and this is about CameraRoll, these are different API's.
Regarding myCameraRoll.browseForImage(), please let us know which version of iOS you are facing this issue? I tried in my iOS 9.3 iPad and it works without issues.
Please try the following code and also let us know the version of iOS you are acing this issue.
package
{
import flash.media.CameraRoll;
import flash.media.MediaPromise;
import flash.media.MediaType;
import flash.events.MediaEvent;
import flash.events.Event;
import flash.display.Loader;
import flash.display.Sprite;
import flash.events.IOErrorEvent;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
public class BrowseImage extends Sprite{
private var mediaSource:CameraRoll = new CameraRoll();
public function BrowseImage() {
this.stage.align = StageAlign.TOP_LEFT;
this.stage.scaleMode = StageScaleMode.NO_SCALE;
if( CameraRoll.supportsBrowseForImage )
{
log( "Browsing for image..." );
mediaSource.addEventListener( MediaEvent.SELECT, imageSelected );
mediaSource.addEventListener( Event.CANCEL, browseCanceled );
mediaSource.browseForImage();
}
else
{
log( "Browsing in camera roll is not supported.");
}
}
private var imageLoader:Loader;
private function imageSelected( event:MediaEvent ):void
{
log( "Image selected..." );
var imagePromise:MediaPromise = event.data;
imageLoader = new Loader();
if( imagePromise.isAsync )
{
log( "Asynchronous media promise." );
imageLoader.contentLoaderInfo.addEventListener( Event.COMPLETE, imageLoaded );
imageLoader.contentLoaderInfo.addEventListener( IOErrorEvent.IO_ERROR, imageLoadFailed );
imageLoader.loadFilePromise( imagePromise );
}
else
{
log( "Synchronous media promise." );
imageLoader.loadFilePromise( imagePromise );
this.addChild( imageLoader );
}
}
private function browseCanceled( event:Event ):void
{
log( "Image browse canceled." );
}
private function imageLoaded( event:Event ):void
{
log( "Image loaded asynchronously." );
this.addChild( imageLoader );
}
private function imageLoadFailed( event:Event ):void
{
log( "Image load failed." );
}
private function log( text:String ):void
{
trace( text );
}
}
}
Copy link to clipboard
Copied
Hi Roshan,
Same issue with your script, the app crash, i can only see the trace "Browsing for image..."
I test on iOs 8.3 (iPad 3) and iOs 9.3.1 (iPad Mini 2).
It's not crashing during the "browseForImage()" instruction, cause if i put a trace just after, i see it, so, i guess it crash asynchronously, some millisecond after it.
My iOS crash report won't be usefull since it begin by :
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
(...)
Copy link to clipboard
Copied
Is there any workarround ? Not Yet ?
Did you reproduce this issue ?
Copy link to clipboard
Copied
Hi,
We are working on it.
Will let you know the status soon.
-Roshan
Copy link to clipboard
Copied
Hi,
We tried to reproduce the issue in iOS 9.3.1 device but it did not.
Please let us know which version of AIR 22 beta you are using? Can you try with the latest one : 22.0.0.137 from here: Download Adobe AIR 22 Beta - Adobe Labs
-Roshan
Copy link to clipboard
Copied
It work with 22.0.0.137 ! Thank you !
I tested with build 89 one. I think my merging of build 129 meet some trouble, I tested it on other computer and it work, sorry for that...
Copy link to clipboard
Copied
Thanks a lot
-Roshan
Adobe AIR
Copy link to clipboard
Copied
Im having a issue with CameraRoll on Android 6 version (specifically Samsung Galaxy S6 with new Android 6 update installed)
When the photo is selected, the the imagepromise never loads. It worked perfectly before the update.
It also works perfectly on my other devices that dont have Android 6 installed.
I used exactly the same code like here for loading: Uploading images from CameraRoll and CameraUI | Adobe Developer Connection
I also tried to load the promise like this once photo is selected:
var loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onMediaLoaded );
loader.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, onError);
loader.loadFilePromise(imagePromise);
but with exactly the same result.
It not really a AIR 22 specific issue, its also happens for AIR 21.
Is there something else i can try?
Copy link to clipboard
Copied
Hi,
This forum is for iOS issue. Please raise your concern in a new forum post. We will look into your concern.
-Roshan