Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example
android
.gitignore
LICENSE
README.md
index.js
package.json

README.md

Barcode Detection Module for React Native

The module only works for Android now.

How to Run the Example

cd Example
npm install
react-native run-android

Screenshots

Barcode Detection for React Native Barcode Detection for React Native

How to Use the Module

  1. Create a new React Native project:

    react-native init NewProject
  2. Add the local module to dependencies in package.json:

    "dependencies": {
    	"react": "16.0.0-alpha.6",
    	"react-native": "0.43.3",
    	"react-native-dbr":"file:../"
    },
  3. Link dependencies:

    react-native link
  4. Use flatDir to define library path in android/build.gradle:

    flatDir {
        dirs "$rootDir/../node_modules/react-native-dbr/android/lib"
    }
    
  5. Use the module in index.android.js:

    import BarcodeReaderManager from 'react-native-dbr';
    
    BarcodeReaderManager.readBarcode('your license key', (msg) => {
        this.setState({result: msg});
    }, 
    (err) => {
        console.log(err);
    });

    If you do not have a valid license, please contact support@dynamsoft.com. With invalid license, the SDK can work but will not return a full result. Invalid license

Blog

Android Barcode Detection Component for React Native

You can’t perform that action at this time.