RxCamera icon indicating copy to clipboard operation
RxCamera copied to clipboard

samsung devices not focus

Open spirosoik opened this issue 9 years ago • 7 comments

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

spirosoik avatar Jul 04 '16 14:07 spirosoik

could you post your code and the system log?

ragnraok avatar Jul 04 '16 16:07 ragnraok

  /**
   * 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 avatar Jul 09 '16 11:07 spirosoik

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

spirosoik avatar Jul 09 '16 11:07 spirosoik

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

ragnraok avatar Jul 10 '16 04:07 ragnraok

@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.

spirosoik avatar Jul 11 '16 07:07 spirosoik

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

ragnraok avatar Jul 20 '16 06:07 ragnraok

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

samy-baili avatar Dec 12 '16 09:12 samy-baili