react-native-camera-kit icon indicating copy to clipboard operation
react-native-camera-kit copied to clipboard

Barcode types and data returns undefined

Open muhammadali1472 opened this issue 3 years ago • 1 comments

Describe the bug When I try to get barcode type and data it returns undefined. To Reproduce Steps to reproduce the behavior:

  const [scanned, setScanned] = useState(false);
  const handleBarCodeScanned = ({ type, data }) => {
    console.log('Type: ' + type + '\nData: ' + data)
  };

 <CameraScreen
        scanBarcode={true}
         onReadCode={scanned ? undefined : handleBarCodeScanned}
          showFrame={true}
          laserColor="red"
          frameColor="white"
          />
  {scanned && <Button title={'Scan again?'} onPress={() => setScanned(false)} />}

Expected behavior should return barcode type and barcode itself

muhammadali1472 avatar Aug 11 '22 21:08 muhammadali1472

https://github.com/teslamotors/react-native-camera-kit/pull/633

I have added codeFormat please test and let know if any issues

android-imdad avatar Dec 22 '23 11:12 android-imdad