Skip to content
This repository was archived by the owner on Jun 16, 2023. It is now read-only.
This repository was archived by the owner on Jun 16, 2023. It is now read-only.

Barcode scanning not consistent on IOS. #3054

@zhhjoseph

Description

@zhhjoseph

Bug Report

To Do First

  • Did you try latest release?
  • Did you try master? No
  • Did you look for existing matching issues?

Platforms

Versions

  • Android:
  • iOS:
  • react-native-camera: ^3.40.0
  • react-native: 0.61.2
  • react: 16.9.0

Description/Current Behaviour

Android works mostly fine. On IOS, in order for barcode to register, I would need to move the camera closer to the barcode so that the width of the barcode fills the screen. Once I move farther, the barcode does not register anymore. I do not encounter this in android. This is all in portrait mode. Also scanning on IOS seem to register a bit slower than Android. Compared to a native barcode scanner on ios there is a noticeable difference, is there anyway to improve that?

Expected Behaviour

Barcode should register at a reasonable distance without having to move camera to have barcode width fill the width of camera.

Steps to Reproduce

Attempt to scan barcode without having to move camera closer to have barcode width fill screen.

Additionals

I did read that this feature here #1852 should help with my issue however there seems to be no difference after implementing it. Is rectOfInterest prop working properly for Ios? There are a couple of PRs that are still open and I would prefer to not fork a version of react-native-camera.

The code:

          <RNCamera
            ref={ref => {
              this.camera = ref
            }}
            rectOfInterest={{
              x: 0.25,
              y: 0.25,
              width: 0.5,
              height: 0.5,
            }}
            flashMode={this.state.camera.flashMode}
            type={this.state.camera.type}
            onGoogleVisionBarcodesDetected={
             shouldBarCodeRead ? this.onBarCodeRead : null
            }
            googleVisionBarcodeType={this.state.barcodeType}
            style={{ flex: 1 }}
          />

Love react-native-camera? Please consider supporting our collective: 👉 https://opencollective.com/react-native-camera/donate
Want this issue to be resolved faster? Please consider adding a bounty to it https://issuehunt.io/repos/33218414

Metadata

Metadata

Assignees

No one assigned

    Labels

    iOSstaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions