Questions tagged [android-camerax]

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).

807 questions
0
votes
1 answer

Is There a bug in CameraX CameraView because it doesn't work?

I am developing an android app that lets users to record videos. I am using CameraX and CameraView as my options. The code used to work 2 weeks ago, but starting this week, CameraView has been displaying black screen only. Are there any solutions to…
Jeremy
  • 73
  • 1
  • 9
0
votes
1 answer

Image resolution is changing in some phones

I'm trying to analyze the image so I set 160, 120 inside setTargetResolution() function but when I run the app it is changing the resolution to 320, 240 in my phone but working fine in other phones. My phone is Redmi 6 pro. HandlerThread…
0
votes
0 answers

How to achieve (video recording and capture frames in real time) simultaneously?

How to achieve (video recording and capture frames in real time) simultaneously using camerax? What I tried till now. I tried to bind camera preview, videoCapture and imageAnalysis use cases together but got this…
0
votes
0 answers

How to get the position/ coordinates from a detected object with the TensorFlow Lite Interpreter?

I am building an app for object detection with a camera api (camerax) and a self-trained tflite model. For the integration of tflite I have tried two approaches. First with the ML Kit and second with the TensorFlow Lite inference. I like the second…
0
votes
1 answer

Trying to setOnKeyListener on camaraX

I'm trying to make an app take a picture when the volume buttons are pressed, like snapchat and the like do. This app is using the CamaraX Library for camera functionality. Now as far as I can tell the CameraXView should let me set an onKeyListener…
btd
  • 1
0
votes
0 answers

How do I save a picture to the default images folder on Android?

I have this function that saves an image to the Internal storage/Android/media folder on your phone: fun getOutputDirectory(): File { val mediaDir = externalMediaDirs.firstOrNull()?.let { File(it,…
Bert Hanz
  • 417
  • 1
  • 7
  • 16
0
votes
0 answers

How do I capture a video without audio with CameraX?

I'm able to successfully capture a video using a VideoCapture use case in CameraX. However, I do not want to capture audio. Is this possible?
John Zhang
  • 518
  • 1
  • 5
  • 12
0
votes
2 answers

How to set viewfinder using CameraX in Java?

I have been working on an app which needed to use CameraX for it's preview stream but it also needs a viewfinder. I have successfully implemented the preview but for the viewfinder part most of the codes that I can find online is in Kotlin and I…
doomsday
  • 141
  • 2
  • 12
0
votes
1 answer

How to analyze that what i see in PreviewView (Camerax)?

I am new here so firstly I would like to say "Good Morning Everyone!" ;) Now I would like to describe my problem. I use CameraX, PreviewView, and ImageAnalyzer. My PreviewView isn't on the entire screen but in a separate window. See image I would…
Maxteusz
  • 1
  • 1
0
votes
1 answer

How can I connect ImageAnalyzer class to class where qr code should be recognized?

I have two classes: QrActivity, where camera is turned on to scan qr codes, and BarcodeAnalyzer, where image analyze process is going. I am doing it with cameraX and ML Kit. That's my QrActivity: package ge.softservice.nfcwithactivties import…
X Y
  • 119
  • 9
0
votes
2 answers

Android CameraX: java.lang.IllegalStateException: maxImages (2) has already been acquired, call #close before acquiring more

Whenever a second picture is taken getting this particular error: D/CaptureSession: Issuing capture request. W/ImageReader_JNI: Unable to acquire a buffer item, very likely client tried to acquire more than maxImages…
Prajwal Bhat
  • 75
  • 1
  • 8
0
votes
1 answer

How to use CameraX to build my custom Camera?

I want to create a Camera Screen without using Implicit intent. So I'm using CameraX to achieve this. I got a code from Github. I'm trying to solve this error: incompatible types: File cannot be converted to Executor imgCap.takePicture(file,new…
Parag Rane
  • 179
  • 4
  • 15
0
votes
1 answer

Select torch to use with Android CameraX

I have developed an application that uses the Camera using the CameraX library. I can control both the front and back cameras and turn their torches on and off. The problem is that one phone, a Huawei P20, has 2 torches on the back camera. Using the…
DrMaxB
  • 540
  • 1
  • 3
  • 13
0
votes
0 answers

Having trouble providing `context` to RenderScript.create()

Constructing a RenderScript for my app using the line val rs = RenderScript.create(getContext()) Android Studio warns me that "CameraX.getContext can only be called from within the same library group (groupId=androidx.camera)" What should I be…
Keith
  • 1,777
  • 3
  • 15
  • 20
0
votes
1 answer

Is it possible to take a picture without any interaction? (Android Studio, CameraX)

I want my camera to take a picture by itself without any interaction. More detailed: Im coding a Textdetector with the ML Kit. But the detection is not that good. Sometimes it is perfect, sometimes not. So my idea is to take a picture in a certain…
Pyllic
  • 1
  • 2