# interpro-react-native-barcode-scanner

> A configurable barcode scanning component that uses RNCamera to capture and return barcode and QR code data

Latest version **0.1.5** (published 2022-03-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install interpro-react-native-barcode-scanner
pnpm add interpro-react-native-barcode-scanner
yarn add interpro-react-native-barcode-scanner
bun add interpro-react-native-barcode-scanner
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2022-03-31 |
| First published | 2022-03-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 36.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | James Baffoni |
| Maintainers | jamesbaffoni |
| Keywords | react-native, ios, android |

## Links

- npm: https://www.npmjs.com/package/interpro-react-native-barcode-scanner
- Repository: https://github.com/jamesbaffoni/interpro-react-native-barcode-scanner
- Homepage: https://github.com/jamesbaffoni/interpro-react-native-barcode-scanner#readme
- Issues: https://github.com/jamesbaffoni/interpro-react-native-barcode-scanner/issues
- npm.io page: https://npm.io/package/interpro-react-native-barcode-scanner

## Dependencies (1)

- [react-native-camera](https://npm.io/package/react-native-camera.md) ^4.2.1

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.1.5 (latest) — 2022-03-31
- 0.1.4 — 2022-03-31
- 0.1.3 — 2022-03-31
- 0.1.2 — 2022-03-31
- 0.1.1 — 2022-03-31

## README

# interpro-react-native-barcode-scanner

A configurable barcode scanning component that uses RNCamera to capture and return barcode and QR code data.  Built by InterPro Solutions

## Installation

```sh
npm install interpro-react-native-barcode-scanner
```

Follow the platform-specific installation steps below.  For help troubleshooting issues with ```RNCamera```, please refer to the installation instructions here:

https://react-native-camera.github.io/react-native-camera/docs/installation

## iOS - Required steps

Add permissions with usage descriptions to your app ```Info.plist```:

```xml
<!-- Required with iOS 10 and higher -->
<key>NSCameraUsageDescription</key>
<string>Your message to user when the camera is accessed for the first time</string>
```

## Android - Required steps

Add permissions to your app ```android/app/src/main/AndroidManifest.xml``` file:

```xml
<!-- Required -->
<uses-permission android:name="android.permission.CAMERA" />
```

Insert the following lines in ```android/app/build.gradle```:

```
android {
  ...
  defaultConfig {
    ...
    missingDimensionStrategy 'react-native-camera', 'mlkit' // <--- insert this line
  }
}
```

## Usage

```js
import {
  IpBarcodeScanner,
  IpBarcodeScannerType,
} from 'interpro-react-native-barcode-scanner';

// ...

const scannerRef = useRef<IpBarcodeScannerType>(null);

// ...

<Button
  onPress={() => scannerRef?.current?.openScanner()}
  title={'Scan Barcode'}
/>
<IpBarcodeScanner
  ref={scannerRef}
  onBarcodeDetected={(data: any) => console.log(data)}
/>
```

## License

MIT

---
_Source: https://npm.io/package/interpro-react-native-barcode-scanner · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
