Closed thidasapankaja closed 6 months ago
I'm trying to use this in a project.
Created a component like this
export function CreditCardScanner() { const cardScannerRef = useRef(null); return ( <View> <Button onPress={() => { console.log('cardSca: ', cardScannerRef?.current); cardScannerRef?.current?.startCamera(); }}] title="Click" /> <CardScanner style={{ flex: 1 }} PermissionCheckingComponent={<LoadingIndicator />} ref={cardScannerRef} didCardScan={(response) => { console.log('Card info: ', response); }} /> </View> ); }
When I tapped on the Button, it's not starting the camera at all in Android. I checked the code. In the below file I see only toggleFlash and resetResult are being mapped, not any other functions. How does it work ?
toggleFlash
resetResult
return MapBuilder.of( "toggleFlash", COMMAND_TOGGLE_FLASH, "resetResult", COMMAND_RESET_RESULT );
https://github.com/howljs/rn-card-scanner/blob/main/android/src/main/java/com/rncardscanner/CardScannerViewManager.java
I'm trying to use this in a project.
Created a component like this
When I tapped on the Button, it's not starting the camera at all in Android. I checked the code. In the below file I see only
toggleFlash
andresetResult
are being mapped, not any other functions. How does it work ?https://github.com/howljs/rn-card-scanner/blob/main/android/src/main/java/com/rncardscanner/CardScannerViewManager.java