Closed zjkuang closed 7 months ago
I'm having the same issue
Same here, works fine on iOS but it does not recognize on Android.
same here on android
🙃
log-android.txt This is a log file I captured using 3.6.3 on a Galaxy Tab S9 FE.
I did a Grep for Camera to see if I captured something more meaningful.
I also opened the camera with a codeScanner and put a QR code in front of it.
I also have the MLKIT details in my manifest as shown below
Thanks @grillorafael. Fixed this in #2082
Just released that quick fix in 3.6.4. If you appreciate my dedication and effort towards making VisionCamera better, please 💖 consider sponsoring me on GitHub 💖 to say thanks. :)
Great and awesome! Just tested on 3.6.4 and it worked like magic. @mrousavy @grillorafael
Great and awesome! Just tested on 3.6.4 and it worked like magic. @mrousavy @grillorafael
can you give me reference source code pls
Great and awesome! Just tested on 3.6.4 and it worked like magic. @mrousavy @grillorafael
can you give me reference source code pls
@quocbaooo
const devices = useCameraDevices();
const device = devices.find((d) => d.position === 'back');
const codeScanner = useCodeScanner({
codeTypes: types,
onCodeScanned(codes) {
if (codes.length) {
// process barcodes
}
},
});
const CameraContainer = () => {
return device ? (
<Camera
style={styles.boundingBoxFrame}
ref={camera}
device={device}
isActive={isActive}
enableZoomGesture={Boolean(mode?.photo)}
zoom={device?.neutralZoom ?? 1}
photo={Boolean(mode?.photo)}
codeScanner={codeScanner}
/>
) : (
<></>
);
};
Great and awesome! Just tested on 3.6.4 and it worked like magic. @mrousavy @grillorafael
can you give me reference source code pls
@quocbaooo
const devices = useCameraDevices(); const device = devices.find((d) => d.position === 'back'); const codeScanner = useCodeScanner({ codeTypes: types, onCodeScanned(codes) { if (codes.length) { // process barcodes } }, }); const CameraContainer = () => { return device ? ( <Camera style={styles.boundingBoxFrame} ref={camera} device={device} isActive={isActive} enableZoomGesture={Boolean(mode?.photo)} zoom={device?.neutralZoom ?? 1} photo={Boolean(mode?.photo)} codeScanner={codeScanner} /> ) : ( <></> ); };
What are your imports?
@zjkuang I have an issue with the "useCodeScanner". TypeError: 0, _$$_REQUIRE(_dependencyMap[11(...)e-vision-camera").useCodeScanner is not a function (it is undefined) Do you have any ideas on how to fix it? I really appreciate any help you can provide.
@zjkuang I have an issue with the "useCodeScanner". TypeError: 0, _$$_REQUIRE(_dependencyMap[11(...)e-vision-camera").useCodeScanner is not a function (it is undefined) Do you have any ideas on how to fix it? I really appreciate any help you can provide.
Can you paste your code snippet here? @ngenerapps
@zjkuang import React, {useState, useEffect, Component} from 'react'; import { SafeAreaView, RefreshControl, ScrollView, StatusBar, StyleSheet, PermissionsAndroid, Pressable, Text, useColorScheme, View, TouchableOpacity, Image, TextInput, Linking, Button, AnimationEffect, ReadableStreamReader, ActivityIndicator, } from 'react-native'; import QRCodeScanner from 'react-native-qrcode-scanner'; // import {ViewPropTypes} from 'deprecated-react-native-prop-types'; import {RNCamera} from 'react-native-camera'; import { Camera, useCameraDevices, useCodeScanner, } from 'react-native-vision-camera'; import {useScanBarcodes, BarcodeFormat} from 'vision-camera-code-scanner'; import PropTypes from 'prop-types'; import Axios from 'axios'; import Modal from 'react-native-modal'; import RNRestart from 'react-native-restart'; import Geolocation from '@react-native-community/geolocation'; import WifiManager, {getCurrentWifiSSID} from 'react-native-wifi-reborn'; import {useNetInfo} from '@react-native-community/netinfo';
export default function Home({navigation}) { const devices = useCameraDevices(); const device = devices.back; const types = ['qr'];
useEffect(() => { checkPermission(); }, []);
const checkPermission = async () => { try { const newCameraPermission = await Camera.requestCameraPermission(); console.log('Camera Permission:', newCameraPermission); } catch (error) { console.error('Camera Permission Error:', error); } };
// const [qrCode, setQRCode] = useState('');
// const onCodeScanned = event => { // console.log('Scanned QR Code:', event.nativeEvent.codeStringValue); // setQRCode(event.nativeEvent.codeStringValue); // };
const codeScanner = useCodeScanner({ codeTypes: types, onCodeScanned(codes) { if (codes.length) { // process barcodes } }, });
if (device == null) { return ( <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
</View>
);
}
return (
<SafeAreaView
style={{
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#000',
}}>
<Camera
style={styles.boundingBoxFrame}
ref={Camera}
device={device}
isActive={isActive}
enableZoomGesture={Boolean(mode?.photo)}
zoom={device?.neutralZoom ?? 1}
photo={Boolean(mode?.photo)}
codeScanner={codeScanner}
/>
<View
style={{
position: 'absolute',
bottom: 0,
padding: 16,
backgroundColor: 'rgba(0,0,0,0.5)',
}}>
<Text style={{color: 'white'}}>
{qrCode ? Scanned QR Code: ${qrCode}
: 'Scanning QR code...'}
);
}
const styles = StyleSheet.create({
input: {
height: 40,
margin: 12,
borderWidth: 1.5,
padding: 5,
borderRadius: 12,
fontSize: 16,
width: '85%',
},
modal: {
justifyContent: 'center',
alignItems: 'center',
},
modalTitle: {
color: '#555',
fontSize: 22,
fontWeight: '600',
},
modalText: {
fontSize: 18,
color: '#555',
marginTop: 14,
textAlign: 'center',
marginBottom: 10,
},
button: {
backgroundColor: '#000',
paddingVertical: 12,
paddingHorizontal: 16,
width: '100%',
alignItems: 'center',
marginTop: 10,
},
buttonText: {
color: '#fff',
fontSize: 20,
},
scrollView: {
backgroundColor: '#FFF',
},
});
Not sure It is related, but I cannot read barcodes in iOS, in fact, I cannot read anything in iOS, if I include "codabar" in the CodeTypes passed to the CodeScanner. It outputs an error to the console:
VisionCamera.didSetProps(_:): Updating 15 prop(s)...
VisionCamera.configureCaptureSession(): Configuring Session...
VisionCamera.configureCaptureSession(): Initializing Camera with device com.apple.avfoundation.avcapturedevice.built-invideo:0...
VisionCamera.configureCaptureSession(): Adding Video input...
VisionCamera.invokeOnError(:cause:): Invoking onError(): The value "{
codeTypes = (
"code-128",
"code-39",
"code-93",
codabar,
"ean-13",
"ean-8",
itf,
"upc-e",
qr,
"pdf-417",
aztec,
"data-matrix"
);
onCodeScanned = "
Notice that "codabar" appears unquoted in the list, although I declare it as a string, with quotes.
Not including "codabar" in the list, makes it possible to read other codes successfully. I wonder if "codabar" is a typo.
using: react-native 0.72.5 react-native-vision-camera 3.3.1
Codabar is only available on iOS 15.4
Codabar is only available on iOS 15.4
So, in iOS versions prior to 15.4 we can't read barcodes using this library? And must take care not to initialize the CodeReader with this code or else it won't even run? Or is there a workaround?
So, in iOS versions prior to 15.4 we can't read barcodes using this library?
Wrong. You can read QR codes, Barcodes, and whatever codes, but you cannot read codabar
codes. This is the only code type that you cannot read on iOS 15.3 or lower.
This is btw a platform restriction. This does not work on any iOS app unless it uses a custom MLKit implementation instead of iOS' default one.
And must take care not to initialize the CodeReader with this code or else it won't even run? Or is there a workaround?
I don't know what you mean with this.
Just don't pass codabar
if you don't use it, then you're good
don't know what you mean with this.
I mean exactly what I said. If you try to initialize the CodeScanner with "codabar" in the CodeTypes, (in an older version of iOS) the CodeScanner does not even initialize and the camera doesn't read any type of code whatsoever.
Please understand I am not badmouthing your work, it's a fine piece of software, no doubt there! I just think this should be mentioned in the "known limitations" section. So that this lib doesn't find its way into production code, and some user with a company issued iPhone 6S calls support in panic, because suddenly the app cannot read barcodes and he can't do his job.
@zjkuang I have an issue with the "useCodeScanner". TypeError: 0, _$$_REQUIRE(_dependencyMap[11(...)e-vision-camera").useCodeScanner is not a function (it is undefined) Do you have any ideas on how to fix it? I really appreciate any help you can provide.
I guess you are experiencing the same issue in this post, https://github.com/mrousavy/react-native-vision-camera/issues/2106, and please try the method I suggested there. @ngenerapps
@zjkuang I have an issue with the "useCodeScanner". TypeError: 0, _$$_REQUIRE(_dependencyMap[11(...)e-vision-camera").useCodeScanner is not a function (it is undefined) Do you have any ideas on how to fix it? I really appreciate any help you can provide.
I guess you are experiencing the same issue in this post, #2106, and please try the method I suggested there. @ngenerapps
I got this error
At line:1 char:24
@zjkuang I have an issue with the "useCodeScanner". TypeError: 0, _$$_REQUIRE(_dependencyMap[11(...)e-vision-camera").useCodeScanner is not a function (it is undefined) Do you have any ideas on how to fix it? I really appreciate any help you can provide.
I guess you are experiencing the same issue in this post, #2106, and please try the method I suggested there. @ngenerapps
I got this error
At line:1 char:24
- watchman watch-del-all && yarn start --reset-cache
~~
The token '&&' is not a valid statement separator in this version. + CategoryInfo : Parser Error: (:) [], ParentContainsErr orRecordException + FullyQualifiedErrorId : Invali dEndOfLine
Perhaps your environment is different than mine. (I am on Mac with zsh.) Please search online for how to clean caches for React Native Android in your environment.
I create frame using frame processors to scanner QR code but not working someone help me pls
I create frame using frame processors to scanner QR code but not working someone help me pls
Frame Processor does not work with scanner. I removed it. Please check my code snippet in the content of this ticket.
Same here, works fine on iOS, but it does not recognize on Android. plz help me codeTypes: ['qr', 'ean-13'], "react-native-vision-camera": "^3.6.4", <Camera style={{ width: "100%", height: "100%" , backgroundColor:w}} device={device}
isActive={true}
{...props} codeScanner={codeScanner}
>
Same here, works fine on iOS, but it does not recognize on Android. plz help me codeTypes: ['qr', 'ean-13'], "react-native-vision-camera": "^3.6.4", <Camera style={{ width: "100%", height: "100%" , backgroundColor:w}} device={device}
isActive={true} {...props} codeScanner={codeScanner} >
I face the same issue.
Library version: 3.6.17.
It works well on iPhone but it doesn't work on Redmi 12 Pro.
Same here, works fine on iOS, but it does not recognize on Android. plz help me codeTypes: ['qr', 'ean-13'], "react-native-vision-camera": "^3.6.4", <Camera style={{ width: "100%", height: "100%" , backgroundColor:w}} device={device}
isActive={true} {...props} codeScanner={codeScanner} >
I face the same issue.
Library version: 3.6.17.
It works well on iPhone but it doesn't work on Redmi 12 Pro.
on Redmi 12 pro black screen ?
Same here, works fine on iOS, but it does not recognize on Android. plz help me codeTypes: ['qr', 'ean-13'], "react-native-vision-camera": "^3.6.4", <Camera style={{ width: "100%", height: "100%" , backgroundColor:w}} device={device}
isActive={true} {...props} codeScanner={codeScanner} >
I face the same issue. Library version: 3.6.17. It works well on iPhone but it doesn't work on Redmi 12 Pro.
on Redmi 12 pro black screen ?
Yes, it was a black screen.
There is a tip like this comment to make the camera work. But it's unstable.
Same here, works fine on iOS, but it does not recognize on Android. plz help me codeTypes: ['qr', 'ean-13'], "react-native-vision-camera": "^3.6.4", <Camera style={{ width: "100%", height: "100%" , backgroundColor:w}} device={device}
isActive={true} {...props} codeScanner={codeScanner} >
I face the same issue. Library version: 3.6.17. It works well on iPhone but it doesn't work on Redmi 12 Pro.
on Redmi 12 pro black screen ?
Yes, it was a black screen.
There is a tip like this comment to make the camera work. But it's unstable.
2308
The camera is still visible but it's almost dark, right?
Same here, works fine on iOS, but it does not recognize on Android. plz help me codeTypes: ['qr', 'ean-13'], "react-native-vision-camera": "^3.6.4", <Camera style={{ width: "100%", height: "100%" , backgroundColor:w}} device={device}
isActive={true} {...props} codeScanner={codeScanner} >
I face the same issue. Library version: 3.6.17. It works well on iPhone but it doesn't work on Redmi 12 Pro.
on Redmi 12 pro black screen ?
Yes, it was a black screen. There is a tip like this comment to make the camera work. But it's unstable.
2308
The camera is still visible but it's almost dark, right?
No, it shows the review screen of the camera. But the QR code scan doesn't wok.
Same here, works fine on iOS, but it does not recognize on Android. plz help me codeTypes: ['qr', 'ean-13'], "react-native-vision-camera": "^3.6.4", <Camera style={{ width: "100%", height: "100%" , backgroundColor:w}} device={device}
isActive={true} {...props} codeScanner={codeScanner} >
I face the same issue. Library version: 3.6.17. It works well on iPhone but it doesn't work on Redmi 12 Pro.
on Redmi 12 pro black screen ?
Yes, it was a black screen. There is a tip like this comment to make the camera work. But it's unstable.
2308
The camera is still visible but it's almost dark, right?
No, it shows the review screen of the camera. But the QR code scan doesn't wok.
Can I see your code?
@quocbaooo
<Camera onInitialized={() => setIsActive(true)} style={StyleSheet.absoluteFill} device={device} isActive={isActive} codeScanner={codeScanner} onError={(error) => { console.log('error', error) }} />
Same here, works fine on iOS, but it does not recognize on Android. plz help me codeTypes: ['qr', 'ean-13'], "react-native-vision-camera": "^3.6.4", <Camera style={{ width: "100%", height: "100%" , backgroundColor:w}} device={device}
isActive={true} {...props} codeScanner={codeScanner} >
You should change codeTypes to only "qr". It woks on my side.
codeTypes: ['qr'],
@quocbaooo
<Camera onInitialized={() => setIsActive(true)} style={StyleSheet.absoluteFill} device={device} isActive={isActive} codeScanner={codeScanner} onError={(error) => { console.log('error', error) }} />
still black screen on redmi
Please downgrade to 3.6.16. Are you using expo or cli?
On Thu, Dec 28, 2023 at 12:17 PM Dinoz @.***> wrote:
@quocbaooo https://github.com/quocbaooo
<Camera onInitialized={() => setIsActive(true)} style={StyleSheet.absoluteFill} device={device} isActive={isActive} codeScanner={codeScanner} onError={(error) => { console.log('error', error) }} />
still black screen on redmi
— Reply to this email directly, view it on GitHub https://github.com/mrousavy/react-native-vision-camera/issues/2078#issuecomment-1870928542, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMRFQYEUOGSTWW24IW5EHDYLUTKVAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHEZDQNJUGI . You are receiving this because you are subscribed to this thread.Message ID: @.*** com>
Please downgrade to 3.6.16. Are you using expo or cli? … On Thu, Dec 28, 2023 at 12:17 PM Dinoz @.> wrote: @quocbaooo https://github.com/quocbaooo <Camera onInitialized={() => setIsActive(true)} style={StyleSheet.absoluteFill} device={device} isActive={isActive} codeScanner={codeScanner} onError={(error) => { console.log('error', error) }} /> still black screen on redmi — Reply to this email directly, view it on GitHub <#2078 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMRFQYEUOGSTWW24IW5EHDYLUTKVAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHEZDQNJUGI . You are receiving this because you are subscribed to this thread.Message ID: @. com>
i using cli and version 3.6.16
Is your iOS build (npm run ios) successful with version 3.6.16 ?
On Thu, Dec 28, 2023 at 12:42 PM Dinoz @.***> wrote:
Please downgrade to 3.6.16. Are you using expo or cli? … <#m-8278417348622706491> On Thu, Dec 28, 2023 at 12:17 PM Dinoz @.> wrote: @quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo <Camera onInitialized={() => setIsActive(true)} style={StyleSheet.absoluteFill} device={device} isActive={isActive} codeScanner={codeScanner} onError={(error) => { console.log('error', error) }} /> still black screen on redmi — Reply to this email directly, view it on GitHub <#2078 (comment) https://github.com/mrousavy/react-native-vision-camera/issues/2078#issuecomment-1870928542>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMRFQYEUOGSTWW24IW5EHDYLUTKVAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHEZDQNJUGI https://github.com/notifications/unsubscribe-auth/AMMRFQYEUOGSTWW24IW5EHDYLUTKVAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHEZDQNJUGI . You are receiving this because you are subscribed to this thread.Message ID: @. com>
i using cli and version 3.6.16
— Reply to this email directly, view it on GitHub https://github.com/mrousavy/react-native-vision-camera/issues/2078#issuecomment-1870945820, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMRFQ322S65F3JD2AXCKXLYLUWIBAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHE2DKOBSGA . You are receiving this because you commented.Message ID: @.***>
I only have the problem on Android with Redmi devices, the rest on iOS or other Android devices are still normal
Is your iOS build (npm run ios) successful with version 3.6.16 ? … On Thu, Dec 28, 2023 at 12:42 PM Dinoz @.> wrote: Please downgrade to 3.6.16. Are you using expo or cli? … <#m-8278417348622706491> On Thu, Dec 28, 2023 at 12:17 PM Dinoz @.> wrote: @quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo <Camera onInitialized={() => setIsActive(true)} style={StyleSheet.absoluteFill} device={device} isActive={isActive} codeScanner={codeScanner} onError={(error) => { console.log('error', error) }} /> still black screen on redmi — Reply to this email directly, view it on GitHub <#2078 (comment) <#2078 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMRFQYEUOGSTWW24IW5EHDYLUTKVAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHEZDQNJUGI https://github.com/notifications/unsubscribe-auth/AMMRFQYEUOGSTWW24IW5EHDYLUTKVAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHEZDQNJUGI . You are receiving this because you are subscribed to this thread.Message ID: @. com> i using cli and version 3.6.16 — Reply to this email directly, view it on GitHub <#2078 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMRFQ322S65F3JD2AXCKXLYLUWIBAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHE2DKOBSGA . You are receiving this because you commented.Message ID: @.>
Can you share the code snippet including Camera tag? Because I want to know if you are using frameprocessor
On Thu, Dec 28, 2023 at 12:46 PM Dinoz @.***> wrote:
I only have the problem on Android with Redmi devices, the rest on iOS or other Android devices are still normal
Is your iOS build (npm run ios) successful with version 3.6.16 ? … <#m6791117094928601029> On Thu, Dec 28, 2023 at 12:42 PM Dinoz @.*> wrote: Please downgrade to 3.6.16. Are you using expo or cli? … <#m-8278417348622706491> On Thu, Dec 28, 2023 at 12:17 PM Dinoz @.> wrote: @quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo <Camera onInitialized={() => setIsActive(true)} style={StyleSheet.absoluteFill} device={device} isActive={isActive} codeScanner={codeScanner} onError={(error) => { console.log('error', error) }} /> still black screen on redmi — Reply to this email directly, view it on GitHub <#2078 https://github.com/mrousavy/react-native-vision-camera/issues/2078 (comment) <#2078 (comment) https://github.com/mrousavy/react-native-vision-camera/issues/2078#issuecomment-1870928542>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMRFQYEUOGSTWW24IW5EHDYLUTKVAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHEZDQNJUGI https://github.com/notifications/unsubscribe-auth/AMMRFQYEUOGSTWW24IW5EHDYLUTKVAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHEZDQNJUGI https://github.com/notifications/unsubscribe-auth/AMMRFQYEUOGSTWW24IW5EHDYLUTKVAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHEZDQNJUGI https://github.com/notifications/unsubscribe-auth/AMMRFQYEUOGSTWW24IW5EHDYLUTKVAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHEZDQNJUGI . You are receiving this because you are subscribed to this thread.Message ID: @. com> i using cli and version 3.6.16 — Reply to this email directly, view it on GitHub <#2078 (comment) https://github.com/mrousavy/react-native-vision-camera/issues/2078#issuecomment-1870945820>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMRFQ322S65F3JD2AXCKXLYLUWIBAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHE2DKOBSGA https://github.com/notifications/unsubscribe-auth/AMMRFQ322S65F3JD2AXCKXLYLUWIBAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHE2DKOBSGA . You are receiving this because you commented.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/mrousavy/react-native-vision-camera/issues/2078#issuecomment-1870948545, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMRFQ6UUL4U5ZL6PF5RD3LYLUWXNAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHE2DQNJUGU . You are receiving this because you commented.Message ID: @.***>
![Uploading Screenshot 2023-12-28 at 15.51.21.png…]()
Can you share the code snippet including Camera tag? Because I want to know if you are using frameprocessor … On Thu, Dec 28, 2023 at 12:46 PM Dinoz @.> wrote: I only have the problem on Android with Redmi devices, the rest on iOS or other Android devices are still normal Is your iOS build (npm run ios) successful with version 3.6.16 ? … <#m6791117094928601029> On Thu, Dec 28, 2023 at 12:42 PM Dinoz @.> wrote: Please downgrade to 3.6.16. Are you using expo or cli? … <#m-8278417348622706491> On Thu, Dec 28, 2023 at 12:17 PM Dinoz @.> wrote: @quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo <Camera onInitialized={() => setIsActive(true)} style={StyleSheet.absoluteFill} device={device} isActive={isActive} codeScanner={codeScanner} onError={(error) => { console.log('error', error) }} /> still black screen on redmi — Reply to this email directly, view it on GitHub <#2078 <#2078> (comment) <#2078 (comment) <#2078 (comment)>>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMRFQYEUOGSTWW24IW5EHDYLUTKVAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHEZDQNJUGI https://github.com/notifications/unsubscribe-auth/AMMRFQYEUOGSTWW24IW5EHDYLUTKVAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHEZDQNJUGI https://github.com/notifications/unsubscribe-auth/AMMRFQYEUOGSTWW24IW5EHDYLUTKVAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHEZDQNJUGI https://github.com/notifications/unsubscribe-auth/AMMRFQYEUOGSTWW24IW5EHDYLUTKVAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHEZDQNJUGI . You are receiving this because you are subscribed to this thread.Message ID: @. com> i using cli and version 3.6.16 — Reply to this email directly, view it on GitHub <#2078 (comment) <#2078 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMRFQ322S65F3JD2AXCKXLYLUWIBAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHE2DKOBSGA https://github.com/notifications/unsubscribe-auth/AMMRFQ322S65F3JD2AXCKXLYLUWIBAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHE2DKOBSGA . You are receiving this because you commented.Message ID: @.**> — Reply to this email directly, view it on GitHub <#2078 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMRFQ6UUL4U5ZL6PF5RD3LYLUWXNAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHE2DQNJUGU . You are receiving this because you commented.Message ID: @.>
Do you need anything else?
Can you share the code snippet including Camera tag? Because I want to know if you are using frameprocessor … On Thu, Dec 28, 2023 at 12:46 PM Dinoz @.> wrote: I only have the problem on Android with Redmi devices, the rest on iOS or other Android devices are still normal Is your iOS build (npm run ios) successful with version 3.6.16 ? … <#m6791117094928601029> On Thu, Dec 28, 2023 at 12:42 PM Dinoz @.> wrote: Please downgrade to 3.6.16. Are you using expo or cli? … <#m-8278417348622706491> On Thu, Dec 28, 2023 at 12:17 PM Dinoz @.> wrote: @quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo https://github.com/quocbaooo <Camera onInitialized={() => setIsActive(true)} style={StyleSheet.absoluteFill} device={device} isActive={isActive} codeScanner={codeScanner} onError={(error) => { console.log('error', error) }} /> still black screen on redmi — Reply to this email directly, view it on GitHub <#2078 <#2078> (comment) <#2078 (comment) <#2078 (comment)>>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMRFQYEUOGSTWW24IW5EHDYLUTKVAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHEZDQNJUGI https://github.com/notifications/unsubscribe-auth/AMMRFQYEUOGSTWW24IW5EHDYLUTKVAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHEZDQNJUGI https://github.com/notifications/unsubscribe-auth/AMMRFQYEUOGSTWW24IW5EHDYLUTKVAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHEZDQNJUGI https://github.com/notifications/unsubscribe-auth/AMMRFQYEUOGSTWW24IW5EHDYLUTKVAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHEZDQNJUGI . You are receiving this because you are subscribed to this thread.Message ID: @. com> i using cli and version 3.6.16 — Reply to this email directly, view it on GitHub <#2078 (comment) <#2078 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMRFQ322S65F3JD2AXCKXLYLUWIBAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHE2DKOBSGA https://github.com/notifications/unsubscribe-auth/AMMRFQ322S65F3JD2AXCKXLYLUWIBAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHE2DKOBSGA . You are receiving this because you commented.Message ID: @.**> — Reply to this email directly, view it on GitHub <#2078 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMMRFQ6UUL4U5ZL6PF5RD3LYLUWXNAVCNFSM6AAAAAA6OEQ42OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQHE2DQNJUGU . You are receiving this because you commented.Message ID: @.>
{device != null && ( <ReanimatedCamera style={[StyleSheet.absoluteFill]} device={device} onError={onError} isActive={isActive} format={format} fps={fps} zoom={0} codeScanner={codeScanner} // onInitialized={() => setIsActive(true)} /> )}
@quocbaooo can you let me know your react-native version?
@quocbaooo can you let me know your react-native version?
react native: 0.72.7
You should downgrade the library to v3.6.16. It's working on my side.
What's happening?
I upgraded this dependency from v2 to v3 recently. With 3.5.1 I had an issue that the scanner camera view was not positioned properly on Android. (With 3.5.1 the scanner could scan a barcode very sensitively.) Later I updated it to 3.6.3 and the UI layout problem is gone on Android, but the scanner could not recognized the barcode anymore.
Reproduceable Code
Relevant log output
Camera Device
Device
Google Pixel 7 (Android 13)
VisionCamera Version
3.6.3
Can you reproduce this issue in the VisionCamera Example app?
Yes, I can reproduce the same issue in the Example app here
Additional information