teslamotors / react-native-camera-kit

A high performance, easy to use, rock solid camera library for React Native apps.
MIT License
2.48k stars 589 forks source link

Barcode don't work on specific device: motorola moto g(9) play. Android 11 #464

Open cassioseffrin opened 2 years ago

cassioseffrin commented 2 years ago

Describe the bug onReadCode is not detecting reads on specific model motorola moto g(9) play. Android 11 This bug only happen in this device model. In a large number of devices including ios and android it's ok.

To Reproduce Steps to reproduce the behavior:

Just render a common camera component and wait for the bar code read.

<CameraScreen
            scanBarcode={true}
            onReadCode={(event) => console.log(event.nativeEvent.codeStringValue)}
            showFrame={true}
            laserColor='red'
            frameColor='white' 
/>

Expected behavior Detect the barcode read on all kinds of devices

** The output of: npx @react-native-community/cli doctor

Common ✓ Node.js ✓ yarn

Android ✓ JDK ✓ Android Studio - Required for building and installing your app on Android ✓ Android SDK - Required for building and installing your app on Android ✓ ANDROID_HOME

iOS ✓ Xcode - Required for building and installing your app on iOS ✓ CocoaPods - Required for installing iOS dependencies ✓ ios-deploy - Required for installing your app on a physical device with the CLI

Smartphone:

cassioseffrin commented 2 years ago

I have managed to fix this issue. The PR is here: https://github.com/teslamotors/react-native-camera-kit/pull/465