Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
New Contributor
Posts: 4
Registered: ‎03-06-2012
My Device: Curve 8520
My Carrier: Telcel

Simulator doesn't show files to open

Hi,

 

I have a problem opening files in my Simulator, I have saved some pictures in:

/accounts/1000/shared/photos/

 

 

And when I use file.browseForOpen("Open File"); it doesn't show the images that I have saved there, I'm sure they exist because I use file.exist() and it returns true, so I don't know why they just aren't displayed

 

 

So, what I'm doing wrong?

 

Developer
Posts: 172
Registered: ‎01-17-2011
My Device: 9500 series
My Carrier: Airtel

Re: Simulator doesn't show files to open

[ Edited ]

 

If you are dealing with image browsing , why dont you use CameraRoll Class , It allows you to browse among all image type files. 

private var camerarollToadd : CameraRoll = new CameraRoll();
camerarollToadd.addEventListener(MediaEvent.SELECT,onAddImage);
private function onAddImage(event:MediaEvent):void
{
   var mediaPromise:MediaPromise = event.data;
   image_source= event.data.file.url;
}

 And to open

 

camerarollToadd.browseForImage();

 

 

New Contributor
Posts: 4
Registered: ‎03-06-2012
My Device: Curve 8520
My Carrier: Telcel

Re: Simulator doesn't show files to open

[ Edited ]

Hello,

 

I tried that code and still doesn't show my pictures, some people told me that this is impossible in the simulator, is that true?

Developer
Posts: 172
Registered: ‎01-17-2011
My Device: 9500 series
My Carrier: Airtel

Re: Simulator doesn't show files to open

Have you grant the permission access_shared ?

in simulator you can have choose images but y

New Contributor
Posts: 4
Registered: ‎03-06-2012
My Device: Curve 8520
My Carrier: Telcel

Re: Simulator doesn't show files to open

[ Edited ]

I have enabled access_shared but the application don't ask if I agree or disagree the access shared, anyways my app is a drawing application that save the images in the photos directory, and it doesn't need the access shared.

 

And everytime that I save a file the message prove it with trace(file.nativePath);

[SWF] MyDraw.swf - 2,113,278 bytes after decompression
/accounts/1000/shared/photos/draw.png

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Simulator doesn't show files to open

What file extensions are you trying to save?