Reputation: 28419
I'm looking at the doc http://developer.android.com/reference/android/hardware/Camera.Parameters.html and I'm not seeing anything that would allow me to make it possible for the user to tap on a specific point in the camera preview and have that become the point on which the camera would try to focus.
Is this simply missing? or am I overlooking how this can be done?
Upvotes: 1
Views: 3127
Reputation: 18137
In Android 4.x, this is possible, with the setFocusAreas. You'll have to check getMaxNumFocusAreas first to see if this feature is supported on your device, and how many areas to use.
Then, you'll need to convert the user's touch coordinates to the coordinates used by the Camera.Area object (described here), and call setFocusAreas with the coordinates. From then on, calls to autoFocus will use that region for selecting focus.
Upvotes: 2