• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

AIR 16, CameraRoll Android Error

Engaged ,
Jan 16, 2015 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);

}

TOPICS
Development

Views

432

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
community guidelines

correct answers 1 Correct answer

Engaged , Jan 16, 2015 Jan 16, 2015

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

sorry for the spam... please continue on

Votes

Translate

Translate
Engaged ,
Jan 16, 2015 Jan 16, 2015

Copy link to clipboard

Copied

LATEST

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

sorry for the spam... please continue on

Votes

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
community guidelines