Yalantis / CameraModule

Simple camera module for android applications
https://yalantis.com/
686 stars 193 forks source link

autofocus failed on some devices #11

Open hamsik2046 opened 8 years ago

hamsik2046 commented 8 years ago

hi Yalantis,

thanks for your camera module, it works fine, but i got some "autofous failed" on some devices. here is the error message,and it happens sometime when camera startFocus and the code "camera.autoFocus(callback)" line running:

java.lang.RuntimeException: autoFocus failed at android.hardware.Camera.native_autoFocus(Native Method) at android.hardware.Camera.autoFocus(Camera.java:1148) at com.haofengsoft.lovefamily.camera.CameraPreview.startFocusing(CameraPreview.java:159) at com.haofengsoft.lovefamily.camera.CameraPreview.takePicture(CameraPreview.java:166) at com.haofengsoft.lovefamily.camera.CustomCameraActivity.takePhoto(CustomCameraActivity.java:816) at com.haofengsoft.lovefamily.camera.CustomCameraActivity$4.onClick(CustomCameraActivity.java:494) at android.view.View.performClick(View.java:4444) at android.view.View$PerformClick.run(View.java:18457) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5047) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609) at dalvik.system.NativeStart.main(Native Method)

hamsik2046 commented 8 years ago

error phone list and the android system version:

MI4 LTE 4.4.4 MI 3C 4.4.4 MI 4W 4.4.4 SUMSANG n7508v 4.3 and so on

shliama commented 8 years ago

Hey, thanks for report :+1: Unfortunately we don't have exactly those devices but we'll try fix it in the next update.