skip to Main Content

I’m currently developing a React Native app that incorporates a document scanning feature using the react-native-document-scanner-plugin. While the plugin functions flawlessly on iOS devices, I’ve encountered several issues when using it on Android.

Firstly, the document scanner on Android doesn’t initiate automatic scanning as it does on iOS. Additionally, even when the user manually captures the document, the edges aren’t cropped accurately, necessitating manual corrections using edge lines.

I’ve experimented with various configurations and settings, but haven’t been able to resolve these issues. Could someone suggest alternative plugins or potential workarounds to achieve smoother document scanning functionality on Android?

Ideally, I was expecting the react-native-document-scanner-plugin to perform consistently across both iOS and Android platforms, with automatic scanning and accurate document edge cropping on Android devices, similar to its behavior on iOS. However, since encountering these issues, I’m seeking advice or recommendations for alternative solutions that can deliver reliable document scanning functionality on Android within a React Native app.

2

Answers


  1. If you don’t mind a commercial solution, you can try Genius Scan SDK.
    It’s very good, but expensive (around 6K Euros for a yearly licence).

    https://www.npmjs.com/package/@thegrizzlylabs/react-native-genius-scan

    You can take a look at their sample app to try out the edge detection.

    https://play.google.com/store/apps/details?id=com.thegrizzlylabs.geniusscan.free&hl=en&gl=US

    If you need an open source solution:

    Here’s one:
    https://github.com/Michaelvilleneuve/react-native-document-scanner

    UPDATED

    Take a look at this.
    It’s an OpenCV wrapper for ReactNative.

    You will have to create the UI yourself, but the heavy work (Edge detection, face detection, image filtering, etc) that OpenCV does is handled by it.

    https://github.com/adamgf/react-native-opencv3

    Login or Signup to reply.
  2. Besides Genius Scan SDK, there is the Docutain Scanner SDK, which is also a commercial solution, but more flexible when it comes to pricing.

    They also have an example app and further info on their website:

    https://github.com/Docutain/docutain-sdk-example-react-native

    How to Create a React Native Document Scanner

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search