rn-qr-barcode-image-scan

react native library for scanning qrcode/barcode from image


Keywords
react-native, ios, android
License
MIT
Install
npm install rn-qr-barcode-image-scan@0.1.0

Documentation

rn-qr-barcode-image-scan

react native library for scanning qrcode/barcode from image

Installation

npm install rn-qr-barcode-image-scan

or

yarn add rn-qr-barcode-image-scan

Usage

import { scanFromPath } from 'rn-qr-barcode-image-scan';
import {
  launchImageLibrary,
  type ImageLibraryOptions,
} from 'react-native-image-picker';

// ...

const option: ImageLibraryOptions = {
  mediaType: 'photo',
};
const result = await launchImageLibrary(option);
const uri = result?.assets?.[0]?.uri;
if (!uri) {
  return;
}
//codes: string[]
const codes = await scanFromPath(uri);

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library