Skip to content

autofocus failed on some devices #11

Description

@hamsik2046

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions