07-20-2012 02:59 AM
Hello there, I'm trying to make a photo album app, whereby the app will automatically retrieve all of the photos in the camera roll as well as other albums and display it.
I've added permission inside the bar-descriptor file and I tried using CameraRoll API which allows user to select an image of their choice, but that isn't what I wanted.
Is there any way that I can access the list of image available inside the playbook all at once?
Solved! Go to Solution.
07-20-2012 06:35 AM
Easiest way is probably to recurively search the shared folder for images using the File object.
07-20-2012 08:26 AM
07-21-2012 03:48 AM
Erm I just want to return a query of file url's inside the playbook, and if let's say the user only want a specific album to be displayed then i'll display the images inside the album randomly.
Any sample code which shows how to access the photo album and retrieve the images?
07-21-2012 06:25 AM
It's simple recursion...
private function scan(folder:File):void
{
var entries:Array = folder.getDirectoryListing();
for each (var entry:File in entries)
{
if (entry.isDirectory)
scan(entry) // recurse
else
trace(entry.nativePath); // do something else
}
}
07-23-2012 04:56 AM
Great. so far i've successfully navigate under shared/photos/
Is it possible to navigate to the camera album of the playbook?
07-23-2012 07:41 AM
07-23-2012 08:26 AM
can explain somemore? because i saw this article explaining file layout http://supportforums.blackberry.com/t5/Adobe-AIR-D
07-23-2012 08:43 AM
07-23-2012 10:52 AM
Thanks alot! But after I navigated to it, when i try loading my images into it, it shows up URL not found on the log.
var imageLoader:Loader=new Loader();
imageLoader.load(new URLRequest("shared/camera/IMG_00000528.jpg"));it seems like the URLReq's root file is under app/air. isit possible to change the root of URL to shared/ or using URLReq to navigate up one folder?