Thursday, April 26, 2012

Set Camera.Parameters

In the exercise "Android 4 Face Detection: setFocusAreas() using face detected faces", I set focus area using the code:

camera.getParameters().setFocusAreas(focusList);
camera.getParameters().setMeteringAreas(focusList);

It's in-correct!

It should be modified as:

Parameters para = camera.getParameters(); 
para.setFocusAreas(focusList); 
camera.setParameters(para);

and

Parameters para = camera.getParameters(); 
para.setMeteringAreas(focusList); 
camera.setParameters(para);

1 comment:

Anonymous said...

i am getting setFocusAreas: Failed to parse the input string

error can you help me ??