Capturing with flash on Samsung S6 (6.0.1) causes the camera to become unresponsive.
When capturing a still-shot w/o flash, the app works as intended. But, when a flash occurs, the camera "view" freezes. The app itself is still responsive, as clicking the info button still brings up the dialog. No error messages display to logcat.
Hi, I also facing the same issue on Samsung S6 Edge (6.0.1). But in Samsung S6 (5.1.1), it's working fine. Seems Marshmallow have some issue for capturing with flash
I don't think it is exculsively Marshmallow. I am able to capture flash on other 6.0.1 devices (i.e. Nexus 6, 6p). So maybe Samsung/Marshmallow combo.
On Aug 3, 2016 1:02 AM, "sujewan" [email protected] wrote:
Hi, I also facing the same issue on Samsung S6 Edge (6.0.1). But in Samsung S6 (5.1.1), it's working fine. Seems Marshmallow have some issue for capturing with flash
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/googlesamples/android-Camera2Basic/issues/56#issuecomment-237139881, or mute the thread https://github.com/notifications/unsubscribe-auth/AI0646Ll038Qy2F2rn3DtJzQzK49YK__ks5qcCDBgaJpZM4JY2cC .
It should be a Samsung S6/ S6 edge + marshmallow combo. Because I tried with Samsung S7 Edge with v6.0.1 - Flash capturing is working fine
I'm facing same issue in Galaxy S6, any progress.!?
Nope. Not yet.
Same issue here on Note 5. Any update?
Any news? This is still a bug on my Samsung Galaxy S6 with Android 6.0.1
I have the same issue too. Has anyone a fix for this problem
I have a Samsung Galaxy S6 i this i how fix the flash, I change the setAutoFlash() method with this: flashOn is a boolean that comes of my button to turn on/off the flash
private void setAutoFlash(CaptureRequest.Builder requestBuilder) {
if (mFlashSupported) {
requestBuilder.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AE_MODE_OFF);
requestBuilder.set(CaptureRequest.FLASH_MODE,CameraMetadata.FLASH_MODE_OFF);
if(flashON)
requestBuilder.set(CaptureRequest.FLASH_MODE,CameraMetadata.FLASH_MODE_TORCH);
}
}
@Ashky this works but what if I want to use flash only when in dark areas. I want the flash to work automatically like it does on non Samsung devices.
Any ideas how to make this work?
@yoavya maybe this is that you need
requestBuilder.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AE_MODE_OFF);
requestBuilder.set(CaptureRequest.FLASH_MODE,CameraMetadata.CONTROL_AE_MODE_ON_AUTO_FLASH);
https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#CONTROL_AE_MODE_ON_AUTO_FLASH
@Ashky what you suggest only starts the camera torch constantly.
Also CONTROL_AF_MODE should accept AF related modes and not AE mode
the same for FLASH_MODE that only accepts FLASH_MODE_OFF FLASH_MODE_SINGLE FLASH_MODE_TORCH there is no CONTROL_AE_MODE_ON_AUTO_FLASH for this mode. Unfortunately.
I was able to workaround this by NOT stopping/starting the preview capture request when taking a picture. I was looking into Camera2Raw example where I did not have this issue, and I noticed they dont stop the preview there, so I tried it and it worked. Basically comment this lines: method unlockFocus(): // mCaptureSession.setRepeatingRequest(mPreviewRequest, mCaptureCallback, // mBackgroundHandler);
method captureStillPicture(): // mCaptureSession.stopRepeating(); // mCaptureSession.abortCaptures();
This sample has been migrated to a new location where we can accept Pull Requests (check README for more information).
As recommended by GitHub, we are closing all issues and pull requests now that this older repo will be archived.
If you still see this issue in the updated repo, please reopen the issue/PR there. Thank you!