Can we store images input from photo library into App's documents directory?

Like a private files app. Can we store images into a directory on the iPhone created by the app?

I'm not 100% sure what you mean by "private files app", but you can. Heres some sample code to store/reload one image. Saving/Loading multiple images get kind of tricky.

This will open the library:

1
2
3
4
5
6
local function newphoto ( event )
        if (event.phase == "release") then
                media.show( media.PhotoLibrary, sessionComplete )
                return true
        end
end

Beautiful! Thank you!

What about music and video? Do you think it's possible to do the same like so? media.MusicLibrary or media.VideoLibrary?

No problem. Anyway I have no idea if it will work with music or video, since I've never needed it. I wasn't even aware that Corona started supporting access to music or video libraries.

views:1266 update:2011/10/25 9:10:48
corona forums © 2003-2011