Air 22 beta - App crashes on iOS when I call CameraRoll
hi,
my air app crash since update air 22 (beta of 2016/05/11) when call mycameraroll.browseforimage() on ipad.
it worked before, don't think example reproduce useful...
i hoped crash fixed cameraui one, not..
please fix, , forgive english !
alexandre.
hi,
the bug mentioned in beta release note cameraui , cameraroll, these different api's.
regarding mycameraroll.browseforimage(), please let know version of ios facing issue? tried in ios 9.3 ipad , works without issues.
please try following code , let know version of ios acing 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 image..." );
mediasource.addeventlistener( mediaevent.select, imageselected );
mediasource.addeventlistener( event.cancel, browsecanceled );
mediasource.browseforimage();
}
else
{
log( "browsing in camera roll 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 );
}
}
}
More discussions in AIR Beta Channel
adobe
Comments
Post a Comment