I tried this code but it takes me directly to the Android camera,
local function onPhotoComplete( event ) if ( event.completed ) then local photo = event.target local s = display.contentHeight / photo.height photo:scale( s,s ) print( "photo w,h = " .. photo.width .. "," .. photo.height ) end end if ( media.hasSource( media.Camera ) ) then media.capturePhoto( { listener = onPhotoComplete } ) else native.showAlert( "Corona", "This device does not have a camera.", { "OK" } ) end media.capturePhoto( { listener = onPhotoComplete, destination = { baseDir = system.TemporaryDirectory, filename = "myImage.jpg", type = "image" } })
how I can fill an object with what the camera is capturing and take a picture with the effects
I apologize, I only answered half of this question.
The way I would attempt to accomplish this on Android would be to prompt the user to:
Capture a photo (with code similar to what you posted above), save that image, access that image and populate the screen with that image, and then overlay any effects that you have generated over that image, then take a screen capture.
Of course there may be other ways to accomplish it, but that is the method that I would use to accomplish this functionality.
I apologize, I only answered half of this question.
The way I would attempt to accomplish this on Android would be to prompt the user to:
Capture a photo (with code similar to what you posted above), save that image, access that image and populate the screen with that image, and then overlay any effects that you have generated over that image, then take a screen capture.
Of course there may be other ways to accomplish it, but that is the method that I would use to accomplish this functionality.