Open minh-dai opened 4 years ago
No, In android it not auto take photo, but ios is success
For my device (Oneplus), I found that autofocus keeps failing. Thus, commenting out the conditional at line 553 (https://github.com/Woonivers/react-native-document-scanner/blob/master/android/src/main/java/com/documentscanner/views/OpenNoteCameraView.java) allows the image to be captured.
public void onAutoFocus(boolean success, Camera camera) { Log.d(TAG, "onAutoFocusSuccess: " + success); if (success) { takePicture(); <--- only keep this. } else { onPictureFailed(); } }
It takes photo automatically by default, unless you use Manual capture. https://github.com/Woonivers/react-native-document-scanner#manual-capture