Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [android-camera2]

The android.hardware.camera2 package provides an interface to fully control many apsects of camera device, e.g. CameraDevice, CaptureRequest-CaptureResult flow, Surfaces, ProcessingImages, setting camera parameters, setting request parameters and so on. It replaces the deprecated Camera class.

0 votes
0 answers
22 views

Kotlin cameraManager.cameraIdList returns only 2 ID'd

I'm setting up a camera in Kotlin using the camera2 API, but I need to use the wide-angle lens of my device. In the code cameraManager.cameraIdList only returns the id [0, 1] referring to the rear and ...
Angelo Pavani Neto's user avatar
0 votes
0 answers
14 views

Cancelling ListenableFuture returned from ProcessCameraProvider.getInstance(context) call

According to the documentation of ProcessCameraProvider https://developer.android.com/reference/androidx/camera/lifecycle/ProcessCameraProvider#getInstance(android.content.Context) the call to ...
Alabama Boy's user avatar
0 votes
1 answer
28 views

Read android.media.Image.hardwareBuffer as opengl texture

In Android using Kotlin and camera2. How do you read image.hardwareBuffer as opengl texture in this section? val onImageAvailableListener = ImageReader.OnImageAvailableListener { reader -> ...
porente's user avatar
  • 421
0 votes
1 answer
21 views

Flashlight toggle issue: Android app only turns on the flashlight, not off

I'm developing an Android app that should toggle the flashlight on or off when the app starts. The goal is to switch the flashlight to the opposite state of what it was when the app was launched. ...
Vlad's user avatar
  • 1
1 vote
1 answer
19 views

Camera2 control torch strength

Im playing around with the camera2Video sample (https://github.com/android/camera-samples/tree/main/Camera2Video), and I want to be able to control not just the torch on/off, but also its strength/...
MikkelT's user avatar
  • 693
0 votes
0 answers
20 views

Android CameraX Unable to configure camera

I'm trying to create a simple camera app on android, I was following this this (medium.com) guide, but my preview doesn't load, I only get an empty screen. Error in logcat: Unable to configure camera ...
zsigmons's user avatar
0 votes
0 answers
23 views

Android camera2 focus distance step size

I'm developing an Android NDK camera2 app for astrophotography, for which I need the best possible focus. Considering that it is a photo in very low light conditions, with a standard smartphone device,...
Danko Dnevic's user avatar
0 votes
0 answers
17 views

CONTROL_AE_MODE_ON_AUTO_FLASH does not capture flash during initial capture but works on every subsequent capture

I am trying to use CONTROL_AE_MODE_ON_AUTO_FLASH to capture a photo but it does not capture on certain devices at the first capture. The flash will work on subsequent captures after. I tried multiple ...
user25778714's user avatar
1 vote
1 answer
29 views

Opening Second Camera with Camera2 Multicamera API

I am working towards a camera app that can record video from the two back cameras on a phone. I have an OpenCamera function that is able to open the main back camera, but fails to open the ultrawide ...
Mayaank Pillai's user avatar
0 votes
1 answer
64 views

Replace LegacyCamera with Camera2

In this device with AOSP 10, I have currently the LegacyCamera API for the camera but I want to replace it with Camera2. What should I change to have it build and install Camera2 by default instead of ...
jesusjimsa's user avatar
0 votes
0 answers
21 views

IllegalStateException: Surface has been abandoned when trying to use ImageWriter to write into MediaRecorder's surface

I'm trying to use ImageWriter to stream from Camera2 device to MediaRecorder's surface(recording video basically). And it works on one of two devices I tried it on but on Samsung SM-G955U1 at some ...
s0nicYouth's user avatar
0 votes
1 answer
39 views

Unable to trigger flash when capturing still image using camera2 API

I am trying to automatically trigger flash when capturing an image using the Camera2 API. I tried to use both CONTROL_AE_MODE_ON_ALWAYS_FLASH and CONTROL_AE_MODE_ON_AUTO_FLASH but both did not work. ...
user25778714's user avatar
1 vote
1 answer
30 views

Options to set Automatic White Balance (AWB) & other low level camera settings using flutter camera plugin

I'm building a flutter app which records a video and saves it to a local file. While recording the video I need to set values/enable/diable Automatic White Balance (AWB),exposure, ISO & other low ...
P.C.'s user avatar
  • 93
0 votes
0 answers
44 views

Android - How to display captured image from CameraX full size in ImageView?

I am using Kotlin CameraX, I have successfully implemented PreviewView with ratio 16:9 I successfully Captured Image using ImageCapture.takePicture(...) imageCapture.takePicture(executor, object : ...
Taufik Fadlurahman Fajari's user avatar
0 votes
0 answers
29 views

Camera crop working on Android 10. Not working on Android 11 or 12

Below is a very small gitHub project for image cropping from camera pic or gallery pic. So, on the android java side it is using the 'edmodo' image cropper library- com.theartofdev.edmodo.cropper But ...
TryCatch's user avatar

15 30 50 per page
1
2 3 4 5
112