Show an objet on screen while camera is on.

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 )

Hi @blablu1212,

If this post is related to the other thread you started (link below), please continue the discussion there. It’s difficult to track different threads on the same issue. I will lock this thread in the meantime.

https://forums.coronalabs.com/topic/59607-capture-a-photo-on-camera/

Best regards,

Brent

Hi @blablu1212,

If this post is related to the other thread you started (link below), please continue the discussion there. It’s difficult to track different threads on the same issue. I will lock this thread in the meantime.

https://forums.coronalabs.com/topic/59607-capture-a-photo-on-camera/

Best regards,

Brent