Skip to content
Advertisement

Tag: android-camerax

CameraX: Animated Zoom

I am developing a camera app and I want to have something like double tap to zoom. I was able to implement that, but later I wanted to improve the app’s UX by animating the zoom. I tried applying a Ticker logic to do that but performing a simple zoom call from the CameraX API takes its own time (high

Why are images not being acquired by the analyze() method?

Summary/TL;DR: ML Object Detection application is unable to detect objects because images aren’t being acquired by analyze() method. BACKGROUND I’m currently working on a mobile application using CameraX and Google ML Kit written in Java. The purpose of the application is to detect objects with a real time camera preview. I implemented ML Kit using this guide aptly titled “Detect

Set CameraX image capture File path

I set the File path to the following: File file = new File(Environment.getExternalStorageDirectory() + “/” + System.currentTimeMillis() + “.png”); But for some reason when i click on the capture image button, it jumps into the onError and logs the following: onError: androidx.camera.core.ImageCaptureException: Failed to write or close the file Answer Your app needs permission to write to the desired location.

Get CameraX final resolution

Just created a camera preview in Android with CameraX with the following configuration: Now, the problem is that such target resolution may not be available, in which case the preview will choose a resolution closed to the requested one. What I’m asking here is a way to know which resolution has effectively be chosen by the preview. Thanks in advance!

Advertisement