Camera for android

Hi,

I just found this awesome video regarding working with Camera filters however I found out that 

object.fill = { type="camera" }

does not work with Android :frowning:

https://www.youtube.com/watch?v=gxMXOrCoMcI

https://github.com/coronalabs/camerafill-samples/blob/master/CameraFillFilters/main.lua

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

would this be a screencapture ?? 

Camera fills aren’t supported on Android. See Joshua Quick’s comment in the below thread:

https://forums.coronalabs.com/topic/45157-camera-fill-with-front-facing-camera/

It’s also noted that this feature is iOS-only in the docs:

https://docs.coronalabs.com/api/type/ShapeObject/fill.html

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.

Camera fills aren’t supported on Android. See Joshua Quick’s comment in the below thread:

https://forums.coronalabs.com/topic/45157-camera-fill-with-front-facing-camera/

It’s also noted that this feature is iOS-only in the docs:

https://docs.coronalabs.com/api/type/ShapeObject/fill.html

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.