In my current application, I have a class containing an instance of the Camera object and trying to do the following:
1) Wait for a while, for example. nothing (this is done through TimerTask) 2) Request focus through autofocus 3) In the autoFocus callback, request OneShotPreviewCallback 4) Save the image when calling the preview callback 5) Repeat
While the white balance works fine until the first autofocus, it stops after the first focus has been performed. Well, of course, I looked at the API, and there is one interesting statement in the description of autoFocus.
But auto focus may temporarily stop auto exposure and auto white balance during focus.
But it seems that he is not stopped only temporarily, but persistently. Funny, with a subsequent call to autofocus, the camera again tries to whiten the whitening, but the correct value mainly happens only with the second or third autofocus.
I also tried to set the white balance in the code, but didn't change anything.
setWhiteBalance(Camera.Parameters.WHITE_BALANCE_AUTO);
Does anyone else know this problem, or did I miss some point? I know that I can call autoFocus for a long time to force white alignment, but for me this does not seem optimal, because before the first call to auf autoFocus, it works fine.
PS: I am testing Samsung Galaxy S2 with Android 4.0.3.
source share