Debugging Raw Scanned Barcode Data, added sample images and log to onBarcodeScan

This commit is contained in:
2024-08-11 00:12:48 +08:00
parent 9972de364f
commit 202e04e272
16 changed files with 9 additions and 5 deletions

View File

@@ -149,11 +149,15 @@ const QRScannerScreen: React.FC<{ clearScanData: () => void }> = ({ clearScanDat
<View style={styles.cameraContainer}> <View style={styles.cameraContainer}>
{cameraVisible && ( {cameraVisible && (
<CameraView <CameraView
onBarcodeScanned={scanned ? undefined : ({ data }) => handlePayload(data)} onBarcodeScanned={scanned ? undefined : ({ data, type }) => {
barcodeScannerSettings={{ barcodeTypes: ['qr', 'pdf417'] }} console.log("Barcode Type:", type); // Log the type of barcode scanned
console.log("Raw Scanned Barcode Data:", data); // Log the raw barcode data
handlePayload(data);
}}
style={styles.camera} style={styles.camera}
enableTorch={enableTorch} enableTorch={enableTorch}
/> />
)} )}
<TouchableOpacity onPress={toggleTorch} style={styles.flashButton}> <TouchableOpacity onPress={toggleTorch} style={styles.flashButton}>

BIN
temp/Sample QR/EmailTO.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

BIN
temp/Sample QR/Phone.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

BIN
temp/Sample QR/SMSTO.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

BIN
temp/Sample QR/Text.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

BIN
temp/Sample QR/WIFI_WEP.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

BIN
temp/Sample QR/WIFI_WPA.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

View File

Before

Width:  |  Height:  |  Size: 829 KiB

After

Width:  |  Height:  |  Size: 829 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 815 B

After

Width:  |  Height:  |  Size: 815 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

BIN
temp/Sample QR/whatsapp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB