andreluisjunqueira / react-native-document-scanner-android

Document scanner android, feature live detection, auto-capture, perspective correction :vibration_mode: :camera: -- :trophy:
MIT License
82 stars 32 forks source link

Capture detection and scanning not working #18

Open vedsahani opened 5 years ago

vedsahani commented 5 years ago

I am using react-native-documentscanner-android. I have done all steps and camera is opening with write storage permission but scanning is not working. Please help, I got stuck from last two days. <DocumentScanner onPictureTaken={data =>{ console.log(data.path) }} onProcessing={() => alert(11)} enableTorch={false} detectionCountBeforeCapture={10} style={styles.scanner} />

andreluisjunqueira commented 5 years ago

Did you incude the

include ':openCVLibrary310'
project(':openCVLibrary310').projectDir = new File(rootProject.projectDir,'../node_modules/react-native-documentscanner-android/android/openCVLibrary310')

this is the main think you have to do . Please give more informations.

vlad-grybennikov commented 5 years ago

I'm also faced with the same issue. I tried to fix it, but nothing help :( RN version: 0.57.8

In LogCat I see only one error: "Cannot load info library for OpenCV".

OpenCV included in a project and I did all that should in the manual install. Camera opened, but scanning isn't happening...

vlad-grybennikov commented 5 years ago

So, After a few hours, fixed this bug. It consists of two parts. Explain: 1) Problem is in the "main/jniLibs" folder. You should add all the architecture OpenCV libs. (downloaded it from here https://opencv.org/releases.html) 2) I faced with java.lang.RuntimeException: takePicture failed error. Problem is in file OpenNoteCameraView.java. I can't find what is this problem, but when I revert to the previous version – it has gone. Hope it will be helpful to you. Maybe one day I'll have more time, I can find a solution for the second problem and do PR.

vedsahani commented 5 years ago

Hi,

Did you resolved the issue?

On Mon, 25 Mar, 2019, 00:31 Vladislav Trostinsky, notifications@github.com wrote:

I'm also faced with the same issue. I tried to fix it, but nothing help :( RN version: 0.57.8

In LogCat I see only one error: "Cannot load info library for OpenCV".

OpenCV included in a project and I did all that should in the manual install. Camera opened, but scanning isn't happening...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/andreluisjunqueira/react-native-documentscanner-android/issues/18#issuecomment-475989093, or mute the thread https://github.com/notifications/unsubscribe-auth/AGfPs12aII5Cw-VV05b0lXs-MC5sNou4ks5vZ8tvgaJpZM4airrL .

vlad-grybennikov commented 5 years ago

Hi, Did you resolved the issue? On Mon, 25 Mar, 2019, 00:31 Vladislav Trostinsky, @.***> wrote: I'm also faced with the same issue. I tried to fix it, but nothing help :( RN version: 0.57.8 In LogCat I see only one error: "Cannot load info library for OpenCV". OpenCV included in a project and I did all that should in the manual install. Camera opened, but scanning isn't happening... — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#18 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AGfPs12aII5Cw-VV05b0lXs-MC5sNou4ks5vZ8tvgaJpZM4airrL .

Please read my message above. I wrote all the steps to fix this issue, but this isn't best solution.