Camera Source Fill problem

Hi

I am trying to make Rectangle on the screen which fill by the front camera .

I have try the below code and it doesn’t seems to work on a Android phone.  It  displays a white rectangle on the screen.  Please help all Corona SDK experts

if ( system.getInfo(“environment”) ~= “simulator” ) then

display.setDefault( “cameraSource”, “front” ) --front-facing camera
–display.setDefault( “cameraSource”, “back” ) --back-facing camera
end

local rect = display.newRect( 200, 200, 300, 300 )
rect.fill = { type = “camera” }

I get above code from https://docs.coronalabs.com/api/type/ShapeObject/fill.html

Many Thanks

Hi @kleu060,

The camera “fill” method is only available for iOS at this time, as noted on the documentation page where you pulled the sample from:

Camera Source — used to fill an object with the device camera source (iOS-only).

Best regards,

Brent

Hi @kleu060,

The camera “fill” method is only available for iOS at this time, as noted on the documentation page where you pulled the sample from:

Camera Source — used to fill an object with the device camera source (iOS-only).

Best regards,

Brent