Android Camera - Setting Focus Area Causing Runtime Exception
I'm trying to develop code that automatically focuses on a large object in the middle of the camera frame. Here's my code: Log.i (TAG, 'Picking supported size ' + selected
Solution 1:
From the documentation of getFocusAreas, which doubles as the documentation for setFocusAreas,
Each focus area is a rectangle with specified weight. The direction is relative to the sensor orientation, that is, what the sensor sees. The direction is not affected by the rotation or mirroring of setDisplayOrientation(int). Coordinates of the rectangle range from -1000 to 1000. (-1000, -1000) is the upper left point. (1000, 1000) is the lower right point
So I'd say the 1365 is definitely out of bounds.
Post a Comment for "Android Camera - Setting Focus Area Causing Runtime Exception"