I am using media.show(media.[Camera, PhotoLibrary], sessionComplete, fileSaveTable) with the latest stable build and am getting some odd results on my Android device. First, I am not able to save the image to any directory and two, the event table passed to sessionComplete only has “name” and “completed” fields.
The stripped down code is :
[lua] local fileSaveTable = {baseDir = system.TemporaryDirectory, filename = “le.png”}–or Documents
media.show(media.PhotoLibrary, sessionComplete, fileSaveTable)–or Camera[/lua]
Here is the sessionComplete function:
[lua]local sessionComplete = function( event )
local target = event.target
printr( event )
if not target then
local file = io.open(system.pathForFile(“le.png”, system.TemporaryDirectory), “r”)
if file then
print(“Found File”)
else
print(“File does not Exist!!!”)
end
end[/lua]
I get “File does not Exist!!!” from adb. And then, printr returns “name”=“completion” and “completed” = true", but I do not get any userdata for target or even a nil target entry.
[import]uid: 169884 topic_id: 34118 reply_id: 334118[/import]
