# rn-barcode-scanner

> barcode scanner for react native

Latest version **0.0.13** (published 2017-07-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install rn-barcode-scanner
pnpm add rn-barcode-scanner
yarn add rn-barcode-scanner
bun add rn-barcode-scanner
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.13 |
| Published | 2017-07-20 |
| First published | 2017-07-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | star |
| Maintainers | starhosea |
| Keywords | react, native, barcode, scanner |

## Links

- npm: https://www.npmjs.com/package/rn-barcode-scanner
- Repository: https://github.com/StarHosea/rn-barcode-scanner
- Homepage: https://github.com/StarHosea/rn-barcode-scanner#readme
- Issues: https://github.com/StarHosea/rn-barcode-scanner/issues
- npm.io page: https://npm.io/package/rn-barcode-scanner

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.13 (latest) — 2017-07-20
- 0.0.12 — 2017-07-20
- 0.0.11 — 2017-07-20
- 0.0.10 — 2017-07-20
- 0.0.9 — 2017-07-19
- 0.0.8 — 2017-07-19
- 0.0.7 — 2017-07-19
- 0.0.6 — 2017-07-19
- 0.0.5 — 2017-07-19
- 0.0.4 — 2017-07-19
- 0.0.3 — 2017-07-19
- 0.0.2 — 2017-07-19
- 0.0.1 — 2017-07-19

## README

# rn-barcode-scanner

A Barcode scanner for React Native.


## Installation
1. install from npm

    `npm i --save rn-barcode-scanner `
 
2. link it to you android project

    `react-native link`
        

## Usage

```
import {BarFormat, openBarcodeScanner} from 'rn-barcode-scanner';

//....

class TextComp extends Component{

    doIt(){
        openBarcodeScanner([BarFormat.QR_CODE]).then(
            (result)=>{
                //decoded string from barcode                
            },
            (err)=>{
            
            }
        );
    }
}

//....


```

## Api

- open the barcode scanner
```
/*
* 
* @param formats  supported barcode formats to detect, default is [BarFormat.QR_CODE]
* @param title    decode window's title, default is null
* @param tip      some tip for user to put barcode to the scanning window, default is null
*/
openBarcodeScanner(formats?:Array<string>, title?:string, tip?: string ):Promise<string> 

```



- supported barcode formats

```jsx harmony
BarFormat.QR_CODE
BarFormat.AZTEC
BarFormat.CODABAR
BarFormat.CODE_39
BarFormat.CODE_93
BarFormat.CODE_128
BarFormat.DATA_MATRIX
BarFormat.EAN_8
BarFormat.EAN_13
BarFormat.ITF
BarFormat.MAXICODE
BarFormat.PDF_417
BarFormat.QR_CODE
BarFormat.RSS_14
BarFormat.RSS_EXPANDED
BarFormat.UPC_A
BarFormat.UPC_E
BarFormat.UPC_EAN_EXTENSION

```

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