Status Update
Comments
wu...@google.com <wu...@google.com>
ch...@google.com <ch...@google.com> #2
Thanks for reporting the issue.
Could you provide the device's model name so that we can try to get the exactly same device to clarify this issue?
Thanks.
ma...@gmail.com <ma...@gmail.com> #3
This is an SM-X200 (Samsung Galaxy Tab A8, 2022)
ma...@gmail.com <ma...@gmail.com>
ch...@google.com <ch...@google.com> #4
Thanks. We'll try to get one device and will update our analyzing results after obtaining the device.
ch...@google.com <ch...@google.com> #5
Hi,
We have obtained a Galaxy Tab A8 device. I tested the photo-taking function by the
- RP1A.200720.012.X200XXU1AVG1
- SP1A.210812.016.X200XXU1BVK1
- TP1A.220624.014.X200XXU1CVL5
- UP1A.231005.007.X200XXU3DXB3 (exactly the same as the version mentioned in
)comment#1
Could you try the attached apk to see whether the issue can be reproduced?
In
If it is still a 100% issue on your app but can't be reproduced by the attached apk, could you provide us a minimal project sample code that can reproduce the issue? Thanks.
ma...@gmail.com <ma...@gmail.com> #6
Yes, this occurrs immediately after reboot.
I got approval to make the reproducer, it will take it a bit of time to extract it out from our app.
ma...@gmail.com <ma...@gmail.com> #7
On the A8, it when you hit the button, it starts the capture, but never finishes.
ma...@gmail.com <ma...@gmail.com>
ch...@google.com <ch...@google.com> #8
Thanks for providing the sample project. I can reproduce the issue now.
After some testing, this should be a device-specific issue that we have observed the similar issue on some other devices. The root cause is unclear, but we have a
I found that the issue occurs when ImageCapture use 1920x1080 resolution under the Preview + VideoCapture + ImageCapture UseCase combination. I didn't check all supported output sizes, but maybe you can try either of the following approaches to workaround this issue in your side before the new CameraX library with the solution is released.
Option 1: Force ImageCapture to use other resolution. For example, you can refer the following code to force select 2560x1440 for ImageCapture.
// ImageCapture
imageCapture = ImageCapture.Builder()
.setCaptureMode(ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY)
.apply {
if (camera?.cameraInfo?.hasFlashUnit() == true) {
setFlashMode(viewModel.flashStatus.value)
}
}
// Force select 2560x1440
.setResolutionSelector(
ResolutionSelector.Builder()
.setResolutionStrategy(
ResolutionStrategy(
Size(2560, 1440),
ResolutionStrategy.FALLBACK_RULE_NONE
)
)
.setAspectRatioStrategy(AspectRatioStrategy.RATIO_16_9_FALLBACK_AUTO_STRATEGY)
.build()
)
// Set initial target rotation, we will have to call this again if rotation changes
// during the lifecycle of this use case
// Set initial target rotation
.setTargetRotation(
(_fragmentCameraBinding?.viewFinder?.display?.rotation
?: viewModel.orientation.value)
)
.build()
Option 2: Use hidden API to force enable surface processing mode for VideoCapture
@SuppressLint("RestrictedApi")
videoCapture = VideoCapture.Builder<Recorder>(recorder)
.setSurfaceProcessingForceEnabled()
.build().apply {
setTargetRotation((_fragmentCameraBinding?.viewFinder?.display?.rotation ?: viewModel.orientation.value))
}
Note: please apply the workaround only for Galaxy Tab A8 to avoid unexpected results
ap...@google.com <ap...@google.com> #9
Branch: androidx-main
commit fbeb8430ee66e8bf1a6df102efc30c0fbe0596c7
Author: CharcoalChen <charcoalchen@google.com>
Date: Tue May 21 17:36:54 2024
Apply ImageCaptureFailedWhenVideoCaptureIsBoundQuirk for Samsung Tab A8
On Samsung Tab A8, apps can't take pictures successfully when ImageCapture selects 1920x1080 under Preview + VideoCapture + ImageCapture UseCase combination.
Relnote: "Fixed the issue that apps can't take pictures successfully on Samsung Tab A8 when ImageCapture selects 1920x1080 under Preview + VideoCapture + ImageCapture UseCase combination."
Bug: 336925549
Test: manual test on real device
Change-Id: I5a463a7d42f5adda71c5ce34e934b93fa9969764
M camera/camera-video/src/main/java/androidx/camera/video/internal/compat/quirk/ImageCaptureFailedWhenVideoCaptureIsBoundQuirk.java
ch...@google.com <ch...@google.com> #10
The CL has been merged. Please wait for the next release which will include the workaround. Thanks.
pr...@google.com <pr...@google.com> #11
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.camera:camera-video:1.4.0-beta02
Description
CAMERAX VERSION: 1.4.0-alpha02 - 1.4.0-alpha05
CAMERA APPLICATION NAME AND VERSION: custom app
ANDROID OS BUILD NUMBER: Android 14, UP1A.231005.007.X200XXU3DXB3
DEVICE NAME: Samsung Galaxy Tab A8
DESCRIPTION:
When calling
imageCapture.takePicture
with anImageCapture.onImageSavedCallback
, the onCaptureStarted method is called, but none of the other methods are ever called.Opening the camera and issuing the first imageCapture has logs like this:
Further interactions add the following:
LIST ANY EXPERIMENTAL FEATURES: NONE
STEPS TO REPRODUCE:
OBSERVED RESULTS: takePicture is called, but never returns anything, not even an error.
EXPECTED RESULTS: some kind of return
REPRODUCIBILITY: (5 of 5, 1 of 100, etc) 100% on this device. Exact same code works on other devices (Pixel 7, Samsung Galaxy S24 Ultra, Pixel 3a)
ADDITIONAL INFORMATION:
CODE FRAGMENTS (this will help us troubleshoot your issues):