Hello,
I need to display an object (image) on the screen while camera is on.
I create the object but it doesn’t appear when i test it on real device.
If i create the object inside the “if media.hasSource” statement it won’t appear neither.
Someone can guide?
Thanks
-- camera local function onComplete( event ) local photo = event.target print( "photo w,h = " .. photo.width .. "," .. photo.height ) end if media.hasSource( media.Camera ) then media.capturePhoto( { listener=onComplete } ) else native.showAlert( "Corona", "This device does not have a camera.", { "OK" } ) end -- image group local group = display.newGroup() group.x=150 group.y=100 local myImage = display.newImage( "myimage.png" ) myImage.width=300 myImage.height=300 group:insert( myImage )