1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | local photot = display.newGroup() local function sessionComplete ( event ) t = event.target photot:insert(t) photot.x = _W/2 photot.y = _H/2 + 50 local baseDir = system.DocumentsDirectory display.save(photot, "photo.jpg", baseDir) print( "salvou foto " ) end -- Chama camera local function newphoto ( event ) for i = photot.numChildren,1,-1 do local child = photot[i] child.parent:remove( child ) child = nil end media.show( media.Camera, sessionComplete ) end media.show( media.Camera, sessionComplete ) |
unless you need the latest daily build for a specific reason, it's common for features to work unexpectedly. It's best to either use the stable release, or to find a daily build that works for you, and stick with it.
so I just will put this in building forum and take your suggestion
thanks