Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samsung devices not focus #35

Open
spirosoik opened this issue Jul 4, 2016 · 7 comments
Open

samsung devices not focus #35

spirosoik opened this issue Jul 4, 2016 · 7 comments

Comments

@spirosoik
Copy link

I can see that for a plenty of Samsung devices the camera cannot auto-focus for some reason.

@ragnraok
Copy link
Owner

ragnraok commented Jul 4, 2016

could you post your code and the system log?

@spirosoik
Copy link
Author

  /**
   * Inits the camera view
   */
  private void initCamera() {
    //creates the config for the camera
    RxCameraConfig config = RxCameraConfigChooser.obtain().
        useBackCamera().
        setPreferPreviewSize(new Point(640, 480), true).
        setAutoFocus(true).
        setHandleSurfaceEvent(true).
        get();
    // opens the camera
    RxCamera.open(getContext(), config).flatMap(new Func1<RxCamera, Observable<RxCamera>>() {
      @Override public Observable<RxCamera> call(RxCamera rxCamera) {
        return rxCamera.bindTexture(camTextureView);
      }
    }).flatMap(new Func1<RxCamera, Observable<RxCamera>>() {
      @Override public Observable<RxCamera> call(RxCamera rxCamera) {
        return rxCamera.startPreview();
      }
    }).observeOn(new UIThread().getScheduler()).subscribe(new Subscriber<RxCamera>() {
      @Override public void onCompleted() {
      }

      @Override public void onError(Throwable e) {
      }

      @Override public void onNext(RxCamera rxCamera) {
        rxCamera = rxCamera;
      }
    });
  }

@spirosoik
Copy link
Author

In general seems that camera doesn't focus in any device and it's a problem

@ragnraok
Copy link
Owner

your devices may not support FOCUS_MODE_AUTO, you can try to use areaFocusAction to set the focus area

@spirosoik
Copy link
Author

@ragnraok users are complaining and the device is Samsung Galaxy S7. As you understand it's very difficult to not support FOCUS_MODE_AUTO such a device.

@ragnraok
Copy link
Owner

Hi, have you try the focus mode FOCUS_MODE_CONTINUOUS_VIDEO or FOCUS_MODE_CONTINUOUS_PICTURE, it may better for the long term services such as barcode scanning or voip

@samy-baili
Copy link

I got the same issue on Nexus 5X, auto-focus doesn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants