Coder Social home page Coder Social logo

michaelvilleneuve / react-native-document-scanner Goto Github PK

View Code? Open in Web Editor NEW
837.0 29.0 288.0 83.99 MB

Document scanner, features live border detection, perspective correction, image filters and more ! πŸ“²πŸ“Έ

License: MIT License

Java 95.40% JavaScript 1.24% Objective-C 3.07% Ruby 0.06% Python 0.19% Makefile 0.04%
react-native ios scanner document

react-native-document-scanner's Introduction

Demo gif

React Native Document Scanner

Live document detection library. Returns either a URI or a base64 encoded string of the captured image, allowing you to easily store it or use it as you wish !

Features :

  • Live detection
  • Perspective correction and crop of the image
  • Live camera filters (brightness, saturation, contrast)
  • Flash
  • Easy to use base64 image

Can be easily plugged with react-native-perspective-image-cropper

Demo crop gif

Both Platform

Use version >=1.4.1 if you are using react-native 0.48+

$ yarn add https://github.com/Michaelvilleneuve/react-native-document-scanner

$ react-native link react-native-document-scanner

Edit the info.plist file in XCode and add the following permission : NSCameraUsageDescription

Remember, this library uses your device camera, you can't run it on a simulator.

Android Only

If you do not have it already in your project, you must link openCV in your settings.gradle file

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

In android/app/src/main/AndroidManifest.xml

Change manifest header to avoid "Manifest merger error". After you add xmlns:tools="http://schemas.android.com/tools" should look like this:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.<yourAppName>" xmlns:tools="http://schemas.android.com/tools">

Add tools:replace="android:allowBackup" in <application tag. It should look like this:

<application tools:replace="android:allowBackup" android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:allowBackup="false" android:theme="@style/AppTheme">

Add Camera permissions request:

<uses-permission android:name="android.permission.CAMERA" />

Usage

import React, { Component } from "react";
import { View, Image } from "react-native";

import DocumentScanner from "react-native-document-scanner";

class YourComponent extends Component {
  render() {
    return (
      <View>
        <DocumentScanner
          useBase64
          saveInAppDocument={false}
          onPictureTaken={data =>
            this.setState({
              image: data.croppedImage,
              initialImage: data.initialImage,
              rectangleCoordinates: data.rectangleCoordinates
            })
          }
          overlayColor="rgba(255,130,0, 0.7)"
          enableTorch={false}
          brightness={0.3}
          saturation={1}
          contrast={1.1}
          quality={0.5}
          onRectangleDetect={({ stableCounter, lastDetectionType }) =>
            this.setState({ stableCounter, lastDetectionType })
          }
          detectionCountBeforeCapture={5}
          detectionRefreshRateInMS={50}
          onPermissionsDenied={() => console.log("Permissions Denied")}
        />
        <Image
          source={{ uri: `data:image/jpeg;base64,${this.state.image}` }}
          resizeMode="contain"
        />
      </View>
    );
  }
}

Properties

Prop Platform Default Type Description
overlayColor Both none string Color of the detected rectangle : rgba recommended
detectionCountBeforeCapture Both 5 integer Number of correct rectangle to detect before capture
detectionRefreshRateInMS iOS 50 integer Time between two rectangle detection attempt
enableTorch Both false bool Allows to active or deactivate flash during document detection
useFrontCam iOS false bool Allows you to switch between front and back camera
brightness iOS 0 float Increase or decrease camera brightness. Normal as default.
saturation iOS 1 float Increase or decrease camera saturation. Set 0 for black & white
contrast iOS 1 float Increase or decrease camera contrast. Normal as default
quality iOS 0.8 float Image compression. Reduces both image size and quality
useBase64 iOS false bool If base64 representation should be passed instead of image uri's
saveInAppDocument iOS false bool If should save in app document in case of not using base 64
captureMultiple iOS false bool Keeps the scanner on after a successful capture
onPermissionsDenied android null func Function to call when the Android permissions are denied

Manual capture

  • First get component ref
<DocumentScanner ref={ref => (this.scanner = ref)} />
  • Then call :
this.scanner.capture();

Each rectangle detection (iOS only)

Props Params Type Description
onRectangleDetect { stableCounter, lastDetectionType } object See below

The returned object includes the following keys :

  • stableCounter

Number of correctly formated rectangle found (this number triggers capture once it goes above detectionCountBeforeCapture)

  • lastDetectionType

Enum (0, 1 or 2) corresponding to the type of rectangle found

  1. Correctly formated rectangle
  2. Wrong perspective, bad angle
  3. Too far

Returned image

Prop Params Type Description
onPictureTaken data object Returns the captured image in an object { croppedImage: ('URI or BASE64 string'), initialImage: 'URI or BASE64 string', rectangleCoordinates: 'object of coordinates' }

Save in app document

If you want to use saveInAppDocument options, then don't forget to add those raws in .plist :

<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>

react-native-document-scanner's People

Contributors

ahmetozalp avatar andres-ortiz avatar blntylmn avatar mariot avatar michaelvilleneuve avatar nabati avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-document-scanner's Issues

Android?

Hi there, just wondering if you have any plans on implementing this on Android as well. If not, is the problem straight-forward? Is it something that someone else could tackle? I've found one other repo that claims to do Android document scanning, but it's a WIP still and we haven't been able to get it to run.

Thanks in advance,

M

error: cannot find symbol import org.opencv.DocumentScannerPackage

Screen Shot 2019-06-17 at 3 55 04 PM

This is my package.json file

{
  "name": "TestApp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "react": "16.6.3",
    "react-native": "0.57.8",
    "react-native-document-scanner": "git+https://github.com/Michaelvilleneuve/react-native-document-scanner.git#android"
  },
  "devDependencies": {
    "babel-jest": "24.8.0",
    "jest": "24.8.0",
    "metro-react-native-babel-preset": "0.54.1",
    "react-test-renderer": "16.6.3"
  },
  "jest": {
    "preset": "react-native"
  }
}

Was struggling for past 2 days.. unable to get any solutions.. I just installed using android branch and trying it in android mobile.

Change image quality?

Hey! You did an excellent job with this, and it works amazingly well, but I'm wondering if you're planning to add the ability to change the image quality. Currently, the images end up being exceedingly large (10+mb).

Unable to publish on NPM due to OpenCV size

Publishing the latest version of the package on NPM causes 413 Request entity too large

OpenCV on android adds almost 600MB, we need to find another way to link open CV so that project size won't be impacted

Andorid

Is this module available for android?

Camera blocks UI for a few seconds before loading

Using react navigation stack navigator, when transitioning to the screen with the DocumentScanner, loading this screen blocks the UI for a few seconds before loading. Is there a way to load the camera in the background and have an onReady prop or something similar?

Instructions to run the Example app

These are the steps i followed to run the Example app.

  1. git clone https://github.com/Michaelvilleneuve/react-native-document-scanner.git
  2. cd react-native-documrnt-scanner/Example
  3. npm install
  4. react-native run-ios

This is the error i am getting

error: bundling: UnableToResolveError: Unable to resolve module `react` from `/Users/srujithpoondla/react-native-document-scanner/index.js`: Module does not exist in the module map or in these directories:
  /Users/srujithpoondla/node_modules

But react module is available in node_modules.
Are there any specific instructions to run the example app?

Thanks!

Only one image capture is allowed

Unless you unmount the DocumentScanner component (for instance while showing a review screen), you can't continue taking photos but you are met with a blank screen. Camera view disappears.

react-native-document-scanner not build for android

Does anyone have an idea ?

run :
react-native run-android

result :

BUILD FAILED in 6s

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
/Users/workpc/Projects//android/app/src/main/java/com/isegeldim/MainApplication.java:10: error: cannot find symbol
import org.opencv.DocumentScannerPackage;
^
symbol: class DocumentScannerPackage
location: package org.opencv
/Users/workpc/Projects/
/android/app/src/main/java/com/isegeldim/MainApplication.java:16: error: package com.reactlibrary does not exist
import com.reactlibrary.RNPdfScannerPackage;
^
/Users/workpc/Projects//android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:27: error: cannot find symbol
import org.opencv.DocumentScannerPackage;
^
symbol: class DocumentScannerPackage
location: package org.opencv
/Users/workpc/Projects/
/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:86: error: cannot find symbol
new DocumentScannerPackage(),
^
symbol: class DocumentScannerPackage
location: class PackageList
4 errors

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 6s

at checkExecSyncError (child_process.js:591:13)
at execFileSync (child_process.js:611:13)
at runOnAllDevices (/Users/workpc/Projects/***/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:74:39)
at buildAndRun (/Users/workpc/Projects/***/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:158:41)
at then.result (/Users/workpc/Projects/***/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:125:12)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)

Camera is not stopped if changing screen.

I mean that if I use react-navigation for screen navigation, when I try to change screen during camera is opened it just takes photo in background. To prevent that I added function that can stop camera manually. #36

iOS 8.4 EXC_BAD_ACCESS Issue

I am trying to build your example app on iOS 8.4 but get the following error after around 5 seconds after the application started.

screen shot 2017-10-05 at 17 37 50

Any ideas what could cause this issue?

Stuck on loading sometimes

Sometimes, the camera detects rectangle, and the loading spinner comes up, however the photo is not actually taken and also the camera keeps working normally and detects rectangle, all the while the loading is spinner is still there and unable to click pics further, can anyone help me with this, did anyone faced a similar issue ?

Browser Support

Is there a technical reason for why this is a react native library vs standard react? Does anyone know of a port that is compatible with regular web browsers?

Only stop detection

There is a way to only stop the rectangle detection, and let the camera still open?

Can not run on iOS devices with Xcode9.

Showing All Messages xxxxxx/node_modules/react-native/React/Base/RCTBridgeModule.h:54:16: Redefinition of 'RCTMethodInfo'

Showing All Messages
xxxxxx/node_modules/react-native-document-scanner/ios/RNPdfScannerManager.m:2:9: In file included from xxxxxx/node_modules/react-native-document-scanner/ios/RNPdfScannerManager.m:2:

xxxxxx/node_modules/react-native-document-scanner/ios/RNPdfScannerManager.h:9:9: In file included from xxxxxx/node_modules/react-native-document-scanner/ios/RNPdfScannerManager.h:9:

I use reactive-native 0.48.3. and try run on iOS Devices. Then xcode9 shows build failed with these info.

IOS 13 Some crash or blank/White screen after capture

Hello,

Hello,
With IOS 13, I have several problems.

Crashes of the application without having report of errors and especially a screen which remains white after the capture.

At the debug level, during capture, nothing happens, reactotron does not even return the cropped image and infomation.

So if you had an idea of ​​the causes.

RN 0.38.1 and i try different version of module.

Sorry for double post, i don't use my main account, so i close the double.

How to get working on a new project?

This library looks perfect for a new project I'm working on, but I'm struggling to get it working with a fresh create-react-native-app. I'm pretty new to React-Native, how should I get this library to work on my app? Should I start the react-native app a different way?

Thanks a lot!

I can't see a photo

I make application using your library. But I met error and I can't see anything through camera.
Log is below.

[1631:2881067] Failed to bind EAGLDrawable: <CAEAGLLayer: 0x156e8110> to GL_RENDERBUFFER 2
[1631:2881067] Failed to make complete framebuffer object 8cd6

Do you have a solution? If you know let me know please.

autoFocus failed: Scanner crashes app

Fatal Exception: java.lang.RuntimeException: autoFocus failed
at android.hardware.Camera.native_autoFocus(Camera.java)
at android.hardware.Camera.autoFocus + 1382(Camera.java:1382)
at com.documentscanner.views.OpenNoteCameraView.requestManualFocus + 591(OpenNoteCameraView.java:591)
at com.documentscanner.views.OpenNoteCameraView.focus + 188(OpenNoteCameraView.java:188)
at com.documentscanner.views.MainView.focus + 116(MainView.java:116)
at com.documentscanner.views.MainView.onTouchEvent + 56(MainView.java:56)
at android.view.View.dispatchTouchEvent + 13471(View.java:13471)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3216(ViewGroup.java:3216)
at android.view.ViewGroup.dispatchTouchEvent + 2888(ViewGroup.java:2888)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3222(ViewGroup.java:3222)
at android.view.ViewGroup.dispatchTouchEvent + 2904(ViewGroup.java:2904)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3222(ViewGroup.java:3222)
at android.view.ViewGroup.dispatchTouchEvent + 2904(ViewGroup.java:2904)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3222(ViewGroup.java:3222)
at android.view.ViewGroup.dispatchTouchEvent + 2904(ViewGroup.java:2904)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3222(ViewGroup.java:3222)
at android.view.ViewGroup.dispatchTouchEvent + 2904(ViewGroup.java:2904)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3222(ViewGroup.java:3222)
at android.view.ViewGroup.dispatchTouchEvent + 2904(ViewGroup.java:2904)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3222(ViewGroup.java:3222)
at android.view.ViewGroup.dispatchTouchEvent + 2904(ViewGroup.java:2904)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3222(ViewGroup.java:3222)
at android.view.ViewGroup.dispatchTouchEvent + 2904(ViewGroup.java:2904)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3222(ViewGroup.java:3222)
at android.view.ViewGroup.dispatchTouchEvent + 2904(ViewGroup.java:2904)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3222(ViewGroup.java:3222)
at android.view.ViewGroup.dispatchTouchEvent + 2904(ViewGroup.java:2904)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3222(ViewGroup.java:3222)
at android.view.ViewGroup.dispatchTouchEvent + 2904(ViewGroup.java:2904)
at android.view.ViewGroup.dispatchTransformedTouchEvent + 3222(ViewGroup.java:3222)
at android.view.ViewGroup.dispatchTouchEvent + 2904(ViewGroup.java:2904)
at com.android.internal.policy.DecorView.superDispatchTouchEvent + 731(DecorView.java:731)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent + 1869(PhoneWindow.java:1869)
at android.app.Activity.dispatchTouchEvent + 3487(Activity.java:3487)
at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent + 69(WindowCallbackWrapper.java:69)
at com.android.internal.policy.DecorView.dispatchTouchEvent + 689(DecorView.java:689)
at android.view.View.dispatchPointerEvent + 13719(View.java:13719)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent + 6125(ViewRootImpl.java:6125)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess + 5903(ViewRootImpl.java:5903)
at android.view.ViewRootImpl$InputStage.deliver + 5352(ViewRootImpl.java:5352)
at android.view.ViewRootImpl$InputStage.onDeliverToNext + 5405(ViewRootImpl.java:5405)
at android.view.ViewRootImpl$InputStage.forward + 5371(ViewRootImpl.java:5371)
at android.view.ViewRootImpl$AsyncInputStage.forward + 5530(ViewRootImpl.java:5530)
at android.view.ViewRootImpl$InputStage.apply + 5379(ViewRootImpl.java:5379)
at android.view.ViewRootImpl$AsyncInputStage.apply + 5587(ViewRootImpl.java:5587)
at android.view.ViewRootImpl$InputStage.deliver + 5352(ViewRootImpl.java:5352)
at android.view.ViewRootImpl$InputStage.onDeliverToNext + 5405(ViewRootImpl.java:5405)
at android.view.ViewRootImpl$InputStage.forward + 5371(ViewRootImpl.java:5371)
at android.view.ViewRootImpl$InputStage.apply + 5379(ViewRootImpl.java:5379)
at android.view.ViewRootImpl$InputStage.deliver + 5352(ViewRootImpl.java:5352)
at android.view.ViewRootImpl.deliverInputEvent + 8412(ViewRootImpl.java:8412)
at android.view.ViewRootImpl.doProcessInputEvents + 8345(ViewRootImpl.java:8345)
at android.view.ViewRootImpl.enqueueInputEvent + 8298(ViewRootImpl.java:8298)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent + 8527(ViewRootImpl.java:8527)
at android.view.InputEventReceiver.dispatchInputEvent + 198(InputEventReceiver.java:198)
at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
at android.os.MessageQueue.next + 326(MessageQueue.java:326)
at android.os.Looper.loop + 181(Looper.java:181)
at android.app.ActivityThread.main + 7073(ActivityThread.java:7073)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run + 493(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main + 975(ZygoteInit.java:975)

RNPdfScanner was not found in the UIManager

Although the linking works in the ios devices on the android i get error :
Invariant Violation: requireNativeComponent:"RNPdfScanner"was not found in the UIManager.I follow exactly the steps from readme but i can't get around this error.Thanks

Pass URI instead of base64

I think it should be optional to pass the base64 encoded data and by default pass the URI. This would avoid an, unnecessary, large transfer over the bridge.

Manual capture

Hi, I am using your module in project and I need to call capture method manually after press button, but it captures first rectangle that has beed detected automaticly. Is there any reason how to achieve this?

Document detection improvement

Hello @Michaelvilleneuve,

First of all, thank you so much for this great library, I'm still missing the Android version, but for iOS, that's rocks.

While all is working fine, now that we're using it in production, we are starting to see the detection limitations.

Is there a way to improve the sheet detection ?

Thank you

Example isn't up-to-date

The example from this repo seem to use a different version of the actual version of this package (using <Scanner ... /> instead of <DocumentScanner ... />.

I guess it has been made with an older version of this library.

Could you please update it ?

How to work manual capture

Hi, first thank for your work.
But i have a little problem with manual capture , i cannot understand how to work , and how to retrieve data as onPictureTaken.

Could you explain the difference please ?
Thx.

Build Failed... issue with RCTBridgeModule

This package worked perfectly on my last project (react-native 0.44.0 and react-native-document-scanner ^1.2.1), but I'm getting a build error on my new project (react-native 0.49.1 and react-native-document-scanner 1.3.0). I've tried downgrading the document-scanner to 1.2.1, but it throws the same error...

documentscannererror

I then tried uninstalling the package and unlinking, but my project still wont build. I get an Apple Mach-O Linker Error, which says

"ld: library not found for -lRNPdfScanner
clang: error: linker command failed with exit code 1 (use -v to see invocation)"

Can't seem to resolve either error.

Edit...
List of solutions I've tried so far:

  • Reinstalling/relinking package
  • Downgrading package
  • Clearing derived data
  • Cleaning project then rebuilding

Wondering if I may have to downgrade react native itself

IOS 13 Some crash or blank/White screen after capture

Hello,

Hello,
With IOS 13, I have several problems.

Crashes of the application without having report of errors and especially a screen which remains white after the capture.

At the debug level, during capture, nothing happens, reactotron does not even return the cropped image and infomation.

So if you had an idea of ​​the causes.

RN 0.38.1 and i try different version of module.

Camera preview seem `stretch`

Hi there, anyone notice about Camera preview? My app currently support switch between 2 mode standar Camera and this scan document camera. And I notice preview aspect ratio of this scan document camera seem stretch smaller size than standar camera.

Can not connect to camera.

I try to build app with react-native-document-scanner, use sample code. But when i run on device, my app can not connect to camera. It only show button Flash, text at bottom and all white screen(can't connect to camera).
someone know to fix it? Many thanks.

Any ways to reset camera?

I tried to toggle a state off and on in attempt to reset the scanner, but it didn't work. Screen remained gray.

Use case is that it detects a document, and then shows the cropped image in a modal. The user can choose to accept it or reject it. If the user rejects it, I need to reset the document scanner to make another try.

I tried this but didn't work
`refuse(){
this.setState({docScannerOn:false},this.setState({docScannerOff:false}))}

render(){ return{docScannerOn && <DocumentScanner
useBase64={false}
onPictureTaken={data => this.setState({
frontImage: data.croppedImage,
initialImage: data.initialImage,
rectangleCoordinates: data.rectangleCoordinates,
showScanResultModal:true,
})}
style={styles.preview}
overlayColor="rgba(255,130,0, 0.7)"
enableTorch={torchOn}
brightness={0}
saturation={1}
contrast={1}
quality={1}
onRectangleDetect={({ stableCounter, lastDetectionType }) => this.setState({ stableCounter, lastDetectionType })}
detectionCountBeforeCapture={25}
detectionRefreshRateInMS={10}
/>}.......}`

Invariant Violation: Native component for "RNPdfScanner" does not exist

Hello, it looks like the index.js is not able to load the the RNPdfScanner even if i see

Invariant Violation: Native component for "RNPdfScanner" does not exist

This error is located at:
    in RNPdfScanner (at index.js:33)
    in PdfScanner (at WScanner.js:27)
    in WScanner (at App.js:21)
    in App (at registerRootComponent.js:34)
    in RootErrorBoundary (at registerRootComponent.js:33)
    in ExpoRootComponent (at renderApplication.js:35)
    in RCTView (at View.js:113)
    in View (at AppContainer.js:102)
    in RCTView (at View.js:113)
    in View (at AppContainer.js:122)
    in AppContainer (at renderApplication.js:34)

i see the explicit require on line 5 though

const RNPdfScanner = requireNativeComponent('RNPdfScanner', PdfScanner);

npm 5.5.1
node 9.0.0
expo xde on top

The screen with scanner freezes and app crashes

I found a problem with crashing an app while the scanner is working. I cannot detect the problem when it crashes. If this happens, 90% the screen is black, I mean, when the phone just lies on the table.

RNPdfScanner" does not exist

On androi i get error

index.android.bundle?platform=android&dev=true&hot=true&minify=true:357 Warning: Native component for "RNPdfScanner" does not exist
t @ index.android.bundle?platform=android&dev=true&hot=true&minify=true:357

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.