brownemint / Ti-Android-CameraView

MIT License
23 stars 15 forks source link

Preview out of focus, though pictures usually end up in focus #15

Open skypanther opened 8 years ago

skypanther commented 8 years ago

I realize that this module is no longer supported. But, I'm hoping you or someone watching can help anyway.

The preview is always out of focus. Usually the photos end up being in focus (After calling snapPicture() I can see the image slide into focus right before the picture is actually captured).

But, it makes for bad UX for the user who thinks their photo will be out of focus. Is there a way to get the preview to autofocus?

I have added the permissions keys to my tiapp.xml:

<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera"/>
<uses-feature android:name="android.hardware.camera.autofocus"/>

And my test phone supports focus, as evidenced by the logs:

[INFO]  CameraViewProxy: Setting Preview Display
[INFO]  CameraViewProxy: Trying to match resolution of 1920*1080 for picture
[INFO]  CameraViewProxy: pictureSize width:1920 height:1080
[INFO]  CameraViewProxy: optimalPreviewSize width:1920 height:1080
[INFO]  CameraViewProxy: Auto Focus is Supported
[INFO]  CameraViewProxy: Flash is supported

Also, I can't tap on the screen to focus at a specific spot in the scene (like I can do with the native camera). Any suggestions?

joshualambert commented 7 years ago

I have the same need as above for tap-to-focus. Did anybody figure out how to do this?

m1ga commented 6 years ago

I know its a very old issue, just so it can be closed: https://github.com/brownemint/Ti-Android-CameraView/pull/23 :smile: