I wrote a basic user camera that I recently changed to use the flash (if available) on the device. As soon as I made the change, the code worked fine, as before, on my HTC One Mini 2, but no longer worked on my Galaxy S4. After I went through, I found that my jpeg callback was never reached on S4, an unhandled callback was being executed, but with a null byte [].
I found this similar question:
Problem with S4 Flash
Which, apparently, confirms the presence of a problem and a solution on these devices, but the solution has not been documented.
For repeated iteration, the code works fine on S4 until I turn on the flash drive with:
Camera.Parameters p = mCamera.getParameters();
p.setFlashMode(Camera.Parameters.FLASH_MODE_AUTO);
mCamera.setParameters(p);
Can anyone with experience working on these devices provide a solution?
source
share