Comments (11)
hey @neilanthonyte, did you follow the guide on the website regarding QR scanning? From your code I can't see if you pass in the codeScanner into the Camera component.
from react-native-vision-camera.
hi @Dingenis thanks for the response . . yes I did . . here is the component
const codeScanner = useCodeScanner({
codeTypes: ['qr', 'ean-13'],
onCodeScanned: (codes) => {
onScanFinished({data: codes[0].value});
onClose();
}
})
<Camera
exposure={camera.current ? 1 : 0}
ref={camera}
focusable={true}
codeScanner={codeScanner}
device={device}
format={format}
enableDepthData={true}
enableHighQualityPhotos={true}
pixelFormat='native'
style={StyleSheet.absoluteFill}
isActive={show} />
from react-native-vision-camera.
Mhh weird! Maybe you could use a different QR/barcode to scan? Could be that this specific code doesn't work too well.
from react-native-vision-camera.
yeah that's what I thought @Dingenis the weird thing is that . . i tried QR code checker and it managed to scan the code and get the value.
the QR code also works when I scan it using the built-in camera app on the phone
from react-native-vision-camera.
Mhhh I get that π€ Maybe you could check if the QR scanner in your app works at all by just trying to scan a bunch of codes from the internet. That way, you could narrow down the cause.
from react-native-vision-camera.
hi @Dingenis yes upon testing several QR codes it works with the normal QR code design (white background) . . our current QR code design has black background
. . could that be the reason why the scanner can't detect the QR code? if so do you have an idea as to why the built-in camera app can detect the QR code with black background?
from react-native-vision-camera.
hey @neilanthonyte, I am not sure. This library uses Google MLKit for QR/barcodes, maybe it could be related to this: googlesamples/android-vision#62
from react-native-vision-camera.
There should be a white quiet zone around the QR code or the library may not be able to detect it.
You can also use other advanced barcode reader to read it like this one: https://github.com/tony-xlh/vision-camera-dynamsoft-barcode-reader/
from react-native-vision-camera.
@Dingenis yep definitely related . . :) thanks so much for the reference.
from react-native-vision-camera.
@xulihang thank you so much for the response . . I will definitely try your suggestion and post an update here on the result.
from react-native-vision-camera.
Hey - I use the MLKit library under the hood. If you enabled it in gradle.properties (as the guide in the docs suggests) and it still doesn't work, there is nothing I can do.
Maybe try using one of the Frame Processor plugins, those are more flexible and might detect more stuff or work in different environemnts - the goal of the CodeScanner is to be a simple easy to use installation.
from react-native-vision-camera.
Related Issues (20)
- π Image Compression and Frame Processing Question HOT 3
- π Fatal Error on App Initialization: IllegalArgumentException - width must be positive in CameraDeviceDetails.getFormats HOT 5
- π Unable to scan code-39 barcode. HOT 2
- π V3 is not reading Data-Matrix codes with black background on Android. HOT 4
- π [4.5.3] Google Api Error: Invalid request - Your app declares support for 'riscv64' architecture, but the following libraries are missing HOT 21
- π Can't find VisionCamera.xcodeproj as Readme HOT 3
- π InitializationException - Device reporting less cameras than anticipated HOT 7
- π Fatal Error on App Initialization: IllegalArgumentException - width must be positive in CameraDeviceDetails.getFormats HOT 1
- π§ v4.5.3 fails to build on Android - jetified-camera-core-1.5.0-alpha01/jni/riscv64/libimage_processing_util_jni.so is not an ABI HOT 12
- π TakePhoto() doesn't work with Android Emulator (Pixel 4 API 28, Pixel 4 API 31, Pixel 8 API 31) HOT 1
- β¨ Able to use this library detect QR code from the image HOT 3
- π Issue launching camera on iOS HOT 1
- π§ Unable to find a specification for `react-native-worklets-core` depended upon by `VisionCamera/FrameProcessors` HOT 3
- π Audio is not working ^4.5.3 (IOS) HOT 2
- π§ could not build Objective-C module 'vision_camera_code_scanner' HOT 2
- π Production Build Error with 4.5.3 HOT 3
- π§ Production Build Error with 4.5.3 HOT 5
- β¨ Document Scanner HOT 3
- π error when trying to upload the app to Play Store v4.5.2 and v4.5.3 HOT 3
- π V3 Π½Π΅ ΡΡΠΈΡΡΠ²Π°Π΅Ρ ΠΊΠΎΠ΄Ρ Data-Matrix Ρ ΡΠ΅ΡΠ½ΡΠΌ ΡΠΎΠ½ΠΎΠΌ Π½Π° Android HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-vision-camera.