If your issue is related to observed behavior, rather than API usage, please include information about the specific device (even if the device is an emulator).
Questions tagged [android-camerax]
807 questions
0
votes
0 answers
Using CameraView raises Render Problem on layout file
I am currently testing androidx.camera.view.CameraView, but when I use it with ConstraintLayout (also happens with FrameLayout) it raises a Render Problem.
The versions of CameraX libaries I am using are:…

herculanodavi
- 228
- 2
- 12
0
votes
1 answer
How can I freeze picture of camera with CameraX API in Android Studio?
I'm learning CameraX API, and CameraXBasic is a office sample code.
CameraFragment.kt in CameraXBasic displays a real camera preview, I hope to add a Switch button to freeze current preview, by which the picture will not change even if I move…

HelloCW
- 843
- 22
- 125
- 310
0
votes
1 answer
CameraX preview is showing FRONT camera, taken picture is BACK camera
I'm trying to take selfie picture using cameraX.
Preview works fine and show the front camera, but the actual captured image is from the back camera.
How to fix that problem?
Have anyone faced the same problem before?

Royi
- 745
- 8
- 22
0
votes
1 answer
Preview not displayed after receiving camera permission
I am trying to read a QR code, when i load this logic on a different run than the one i gave permissions on, everything is fine
However, when I want to do it during the permission run, the preview is not loading.
I found some SO post that says load…

Lena Bru
- 13,521
- 11
- 61
- 126
0
votes
0 answers
Image resolution capped on 1024x1024 CameraX
I am using CameraX to capture images in my Android app. The problem I have is I cant change image resolution. Or I should say I cant change it to higher than 1024x1024.
I am trying to change capture resolution to 1920x1080, using aspect ratio and…

Philipp
- 25
- 3
0
votes
1 answer
How to start camera preview in 240 fps range in android using CameraX?
I want to start my camera preview in 240 fps only. I am able to start the preview using CameraX android jetpack library but it is giving me 30 fps. I want to get 240 fps when I open my camera.

Mohit Kapoor
- 11
- 1
0
votes
1 answer
Can I read the opened camera intent from my so
I built a face detection app that is working fine, the user can:
open the camera intent
take a picture
then it will screen this picture and tell if there is a face in it or no.
My idea is I don't need the user to open the camera from my app I need…

Hasan A Yousef
- 22,789
- 24
- 132
- 203
0
votes
2 answers
Why doesn't CameraXBasic project merge two layout files into one?
The following code is from CameraXBasic project Github
The CameraFragment.kt loads fragment_camera.xml first, then loads camera_ui_container.xml.
I find it strange that CameraXBasic project doesn't merge the two layout files both fragment_camera.xml…

HelloCW
- 843
- 22
- 125
- 310
0
votes
1 answer
CameraX Analyzer glitching preview
I am using CameraX Analyzer use-case to detect circles in an image using OpenCV Hough Circles, but even though I believe I am using a separate thread to do this analysis, the camera preview gets really slow sometimes when it gets too many detected…

herculanodavi
- 228
- 2
- 12
0
votes
0 answers
Selecting the stream type for Android Camera2 or CameraX
I need to programmaticaly read pixel values from the camera stream identified by CAM_STREAM_TYPE_PREVIEW stream type.
In CameraX API, this stream is exposed via androidx.camera.core.Preview interface. However, I need programmatic access to the…

Rom
- 4,129
- 23
- 18
0
votes
1 answer
Need pointers in choosing the right way to capture camera input
For a project, I set up a small android application which communicates via TCP with a server, which is my PC. My goal is to basically stream camera input to the server, evaluate them through means of CV, and send a a simple response back. Being a…

Leanhope
- 1
- 4
0
votes
3 answers
On some devices captured image is automatically rotated
So I noticed that on some devices my captured image (bitmap) is weirdly rotated - to 90 degrees usually. I did create a function that can rotate it correctly, but the problem now is, that sometimes the image comes in (is captured) perfectly okay. Is…

MaaAn13
- 264
- 5
- 24
- 54
0
votes
1 answer
Can i capture only top of image with cameraX?
I want to capture the top of an image with cameraX I know we can apply a ratio on image but when I do that the ratio is applied on the center of the image
I look on different method in ImageCaptureConfig.Builder but i found nothing relevant
val…

Drping
- 53
- 12
-1
votes
0 answers
How can access ultra wide lens camera (0.6,0.5)zoom by CameraX or Camera2
I use the cameraX to open the camera with a wide lens, but I did not find any direct way. I tried many methods, and I also tried changing the zoom, but that did not work. I also tried using Camera 2. All methods return the front and back cameras.…

gamal org
- 1
- 1
-1
votes
1 answer
Access external USB camera in Android application
Is there any official android library to access external USB camera in android?
I have gone through all the android/camera-samples. The issue is external USB camera can not be detected/listed in the below code.
val cameraIds2 =…

Rumit Patel
- 8,830
- 18
- 51
- 70