Android Question Camera Focus (auto-focus), how to know the device camera properties?

Cableguy

Expert
Licensed User
Longtime User
Hi guys,

I have on idea for an app but it will only work if the device camera has auto-focus.
How can I programmatically know this property?
 

klaus

Expert
Licensed User
Longtime User
You should look at the CameraEx class.

From the Camera help for AutoFocus:
Starts auto-focus function. The FocusDone event will be raised when the operation completes.
You can check whether the "auto" focus mode is supported with CameraEx class.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Thanks Klaus...
I did find that class, and have been playing with it for a few minutes...
I KNOW my device is fixed Focus, but in the logs, the parameters/features list show a bunch of focus modes available, it is only on the Focus done event that I get the log message of failure...
So I guess that, to know if a device's camera has AF, I must try an AF operation, so I need to start the camera, the preview, try AF, and then release, just to aquire this info.
Any other way to do it?
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Yes it does
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
:-( I had figured that much
 
Upvote 0
Top