camerax.lensfacing.front is black problem

271 views
Skip to first unread message

Brandon Palacios Zamudio

unread,
Jun 29, 2020, 3:09:33 PM6/29/20
to Android CameraX Discussion Group
Hello fellow blessings, I am implementing CameraX for Java using the following dependencies:
def camerax_version = '1.0.0-alpha06'
implementation "androidx.camera:camera-core:$ anclacamerax_version}"
implementation "androidx.camera:camera-camera2:$ anclacamerax_version}"
But the problem is when I try to use the front camera for which it gives me a black screen; there are no problems in camerax.lensfacing.back but the problem is in camerax.lensfacing.front, is there any workaround for this?

Vinit Modi

unread,
Jun 29, 2020, 4:02:21 PM6/29/20
to Brandon Palacios Zamudio, Android CameraX Discussion Group
Hi Brandon,

Can you please use the current Beta release (1.0.0-beta06)? We have had a lot of fixes since alpha06. Thanks!

Vinit

--
You received this message because you are subscribed to the Google Groups "Android CameraX Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camerax-develop...@android.com.
To view this discussion on the web visit https://groups.google.com/a/android.com/d/msgid/camerax-developers/68b89a5e-c1e1-46ea-9296-452b76f60a58n%40android.com.

Brandon Palacios Zamudio

unread,
Jun 29, 2020, 4:54:43 PM6/29/20
to Android CameraX Discussion Group, Vinit Modi, Android CameraX Discussion Group, Brandon Palacios Zamudio

Hi Vinit blessings, I am changing from 1.0.0-alpha06 to 1.0.0-beta06 but it has generated a whole series of errors, would you have any example of how to implement it PLEASE.

Vinit Modi

unread,
Jun 29, 2020, 5:06:18 PM6/29/20
to Brandon Palacios Zamudio, Android CameraX Discussion Group
Hi Brandon,

Recommend looking at CameraXBasic. There are a few changes to make the API more stable since so may require some refactoring from Alpha06, the sample would be a good place to start. Thanks!

Vinit

Brandon Palacios Zamudio

unread,
Jul 1, 2020, 5:53:27 AM7/1/20
to Android CameraX Discussion Group, Vinit Modi, Android CameraX Discussion Group, Brandon Palacios Zamudio
Thank you very much Vinit has worked for me, good that the sample demo was updated, but I have a question, whenever I make an image capture the photo is cropped, is there any way to control it?

Vinit Modi

unread,
Jul 8, 2020, 5:26:52 PM7/8/20
to Brandon Palacios Zamudio, Android CameraX Discussion Group
Sorry for the late reply Brandon, I was out of office.

When you say cropped do you mean that the output resolution / aspect ratio are different from what you set? What resolution and aspect ratio are you setting for the image capture use case? Example: most devices only support 4:3 and 16:9 so if you are setting a square aspect ratio 1:1 the output may not be available on many devices. 

Thanks,
Vinit
Reply all
Reply to author
Forward
0 new messages