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
6
votes
1 answer

Image is already closed. CameraX Analyzer

I am trying to convert the ProxyImage from the cameraX analyzer to Bitmap to analyze the images using Tensor Flow light. So I implemented the cameraX Analyze call back which gives the image as proxyImage. That proxyImage i need to convert to…
6
votes
1 answer

CameraX - Unable to get camera ID for use case androidx.camera.core.Preview-4817149b-004d-42b8-a103-ea998038268b - java.lang.IllegalArgumentException

While implementing the code from Google CodeLabs I am getting this crash report while starting the CameraActivity - CameraX - Google Code Labs Logs: Process: in.novopay.novoloan, PID: 5845 java.lang.IllegalArgumentException: Unable to get…
rohegde7
  • 633
  • 9
  • 15
6
votes
1 answer

Is CameraX api only for Kotlin or it is for java too?

When I went in a sample app code, it was mentioned to choose Kotlin while creating the project. I have use camera2 API before.
byte_bx
  • 71
  • 1
  • 7
5
votes
3 answers

In android jetpack compose when using accompanist permission how to detect if user revoked permission i.e. denied permission twice

I want to know how to detect when the user has revoked permission(denied permission twice) in the accompanist permission library, I also checked the library's GitHub repository and samples are old. I am using, compose_version =…
5
votes
2 answers

How can I change the whiteBalance gains value in android?

I would like to get the value of the current gains and change the value of the RGB gains. In iOS, Apple provides setWhiteBalanceModeLockedWithDeviceWhiteBalanceGains:completionHandler. -…
Balasubramanian
  • 5,274
  • 6
  • 33
  • 62
5
votes
0 answers

Android Appium Camera Testing: How to inject video as if coming from camera to test apps using Appium

We want to automate the testing of an app, the main functionality involves image processing from a video stream coming from the camera. What is the best way to use Appium to inject a video stream and make it appear to the app as if it is coming from…
Saw
  • 6,199
  • 11
  • 53
  • 104
5
votes
0 answers

how to implement custom SurfaceProvider for android Camera x androidx.camera.core.Preview

I'm following this original CameraX Example for Android here: https://developer.android.com/codelabs/camerax-getting-started#5 and…
5
votes
0 answers

CameraX and MediaRecorder for recording video

I tried to use CameraX PreviewView here I'm…
Lyn
  • 507
  • 3
  • 15
5
votes
2 answers

How to access external USB cameras using Android cameraX?

I was following this codelab to create a cameraX application . It's working fine in my phone . But the app I am developing is for an android media player.Which doesn't have any inbuilt camera , only an external usb cam is attached . This is my code…
Aravind OR
  • 97
  • 2
  • 10
5
votes
0 answers

CameraX PreviewView show all but record only an area

What I want to do is show a rectangle over my PreviewView and only record the area inside of that rectangle even if PreviewView shows the whole camera. I just want to save to a file what's inside the white rectangle, but I want the preview to show…
5
votes
3 answers

Android CameraX Error retrieving camcorder profile params

I am migrating to cameraX and faced the exception androidx.camera.core.InitializationException: java.lang.RuntimeException: Error retrieving camcorder profile params The error-log states that this error is thrown when calling …
Ben
  • 53
  • 5
5
votes
1 answer

How do you take a picture with camerax?

I'm still practicing with Kotlin and Android Developing. As far as I understood, Camera class has been deprecated, and Android invites to use Camerax instead, because this high-level class is device-indipendent, and they've made simpler the process…
Giobar
  • 113
  • 2
  • 8
5
votes
1 answer

Working with CameraCaptureSession.CaptureCallback() in CameraX

In-Camera 1, we have FaceDetectionListener and camera.startFaceDetection() method. Using this way it is easier to find faces. In-camera 2, we can do the same using CameraCaptureSession.CaptureCallback() method and this static variable Integer mode =…
Shaon
  • 2,496
  • 26
  • 27
5
votes
1 answer

CameraX View in React Native - Unable to configure camera

I am creating cameraX view for react native through bridging.(Normal Views are rendering in RN. Bridging flow is fine.) Using PreviewView for display camera feed for CameraX’s preview. I have successfully implemented the preview but not sure why…
Balasubramanian
  • 5,274
  • 6
  • 33
  • 62
5
votes
3 answers

green bitmap on analyze in cameraX when imageproxy to bitmap by using Samsung S20

I already use bottom code. But It apear green bitmap when I use imageproxy to bitmap only about lastest smartphone. Such as Samsung s20 Bottom code work well on past device Who does have some problem? fun Image.toBitmap(): Bitmap { val yBuffer =…
You.Brighton
  • 1,958
  • 2
  • 15
  • 22