Highlighted

AIR 16, CameraRoll Android Error

Engaged ,
Jan 16, 2015

Copy link to clipboard

Copied

Hello, I'm trying to use the CameraRoll to access photos on a Galaxy S5 Android device. I'm using the latest version of AIR from the labs.

When I browse for a photo, everything seems to be working correctly, it gives me the options of where to chose from then shows the photos. But anytime I choose a photo, the "ErrorEvent.ERROR" is dispatched and I see the message.

"ERROR #2124: Loaded file is an unknown type."

Has anyone else ever had this problem before? Pretty straight forward code but just doesn't work for me.

if(CameraRoll.supportsBrowseForImage){

var camera:CameraRoll = new CameraRoll();

camera.addEventListener(MediaEvent.SELECT, _onSelect);

camera.addEventListener(Event.CANCEL, _onCancel);

camera.addEventListener(ErrorEvent.ERROR, _onError);

camera.browseForImage();

}

private function _onSelect($event:MediaEvent):void{

    trace("selected");

}

private function _onCancel($event:Event):void{

    trace("cancelled");

}

private function _onError($event:ErrorEvent):void{

    trace("this always fires", $event.text);

}

turns out I was missing <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

sorry for the spam... please continue on

TOPICS
Development

Views

375

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

AIR 16, CameraRoll Android Error

Engaged ,
Jan 16, 2015

Copy link to clipboard

Copied

Hello, I'm trying to use the CameraRoll to access photos on a Galaxy S5 Android device. I'm using the latest version of AIR from the labs.

When I browse for a photo, everything seems to be working correctly, it gives me the options of where to chose from then shows the photos. But anytime I choose a photo, the "ErrorEvent.ERROR" is dispatched and I see the message.

"ERROR #2124: Loaded file is an unknown type."

Has anyone else ever had this problem before? Pretty straight forward code but just doesn't work for me.

if(CameraRoll.supportsBrowseForImage){

var camera:CameraRoll = new CameraRoll();

camera.addEventListener(MediaEvent.SELECT, _onSelect);

camera.addEventListener(Event.CANCEL, _onCancel);

camera.addEventListener(ErrorEvent.ERROR, _onError);

camera.browseForImage();

}

private function _onSelect($event:MediaEvent):void{

    trace("selected");

}

private function _onCancel($event:Event):void{

    trace("cancelled");

}

private function _onError($event:ErrorEvent):void{

    trace("this always fires", $event.text);

}

turns out I was missing <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

sorry for the spam... please continue on

TOPICS
Development

Views

376

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jan 16, 2015 0
Engaged ,
Jan 16, 2015

Copy link to clipboard

Copied

turns out I was missing <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

sorry for the spam... please continue on

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 16, 2015 0