android-camera2-secret-picture-taker
android-camera2-secret-picture-taker copied to clipboard
Pictures are very dark
Pictures captured are very dark and sometimes completely black.
Try to increase the delay used after opening the camera and before starting the capture.
Increasing the delay does not solves the issue (tried 5s, 10s..). I also having the same problem with my Moto G5. Maybe this https://stackoverflow.com/questions/31925769/pictures-with-camera2-api-are-really-dark could help.
I am also facing the "Very dark pictures" bug, I tried to increase the delay but it didn't help.
I increase delay and still dark !!!
Same here. Image is too dark.
Same here, Huawei P10 and image is dark
I just put session.setRepeatingRequest(captureBuilder.build(), null, null);
before session.capture(captureBuilder.build(), captureListener, null);
and it works. But I am not sure if that's the right place to make the setRepeatingRequest.
cameraDevice.createCaptureSession(outputSurfaces, new CameraCaptureSession.StateCallback() {
@Override
public void onConfigured(@NonNull CameraCaptureSession session) {
try {
session.setRepeatingRequest(captureBuilder.build(), null, null);
session.capture(captureBuilder.build(), captureListener, null);
} catch (final CameraAccessException e) {
Log.e(TAG, " exception occurred while accessing " + currentCameraId, e);
}
}
@Override
public void onConfigureFailed(@NonNull CameraCaptureSession session) {
}
}
Hi, this library here works, please refer to it: https://github.com/OmarAflak/Android-Camera2-Library/blob/master/ezcam/src/main/java/me/aflak/ezcam/EZCam.java. Read the readme for implementation on MainActivity. You can create a background service by using a dummy texture view (see closed issue there) and use it without any preview. It results in good pictures with appropriate amount of lighting.
Hi, did anyone managed to find a solution to this problem yet?