Media.show() Does Not Send Target

Richard,

The onComplete() function does not get called until *after* the photo has been saved to file. I’ve tested this for myself on Android by having [lua]media.show(“camera”, …)[/lua] save to file and then called [lua]display.newImage()[/lua] on that photo file to display it. It was working fine for me.

Also, please note that the Corona Simulator does not support saving images to file via the [lua]media.show()[/lua] function. This functionality is currently only supported on iOS and Android. We plan on adding this functionality to the Corona Simulator in the future. [import]uid: 32256 topic_id: 34118 reply_id: 135947[/import]

Omega,

I thought your [lua]local file[/lua] variable was falling out of scope due to the missing [lua]end[/lua] statement and then your [lua]if file then[/lua] check was then looking up a global “file” variable that didn’t exist and would return [lua]nil[/lua]. That’s what I was thinking. :slight_smile:

Let me ask you this. Are you seeing this problem on iOS or Android?
I’ve tested this out on Android and it worked for me.

Also note that our [lua]media.show()[/lua] API cannot save to file in the Corona Simulator and will display an image instead. This is because we haven’t added this functionality to the simulator yet. [import]uid: 32256 topic_id: 34118 reply_id: 135948[/import]

Thanks Joshua. I solved the issue. I was looking for a png and not a jpg :slight_smile: [import]uid: 169884 topic_id: 34118 reply_id: 135952[/import]