react-native-barcode-scanner icon indicating copy to clipboard operation
react-native-barcode-scanner copied to clipboard

React Native Barcode Scanner

React Native Barcode Scanner

npm version npm Platform - Android and iOS License: MIT styled with prettier

Installation

Add the dependency:

npm i @paraboly/react-native-barcode-scanner

Peer Dependencies

IMPORTANT! You need install them
"react": ">= 16.x.x",
"react-native": ">= 0.55.x",
"react-native-camera": ">= 3.31.0"

iOS Installation

Do not forget to add this on Podfile

pod 'react-native-camera', path: '../node_modules/react-native-camera', subspecs: [
    'TextDetector',
    'FaceDetectorMLKit',
    'BarcodeDetectorMLKit'
  ]

Android Installation

In app -> build.gradle -> defaultConfig add this line

missingDimensionStrategy 'react-native-camera', 'general' 

Usage

Import

import BarcodeScanner from "@paraboly/react-native-barcode-scanner";

Navigation Usage

I suggest you that you the barcode scanner as a new Screen and make it a part of Navigation Service.

<BarcodeScanner />

Author

FreakyCoder, [email protected]

License

React Native Barcode Scanner is available under the MIT license. See the LICENSE file for more info.