An open API service indexing awesome lists of open source software.

https://github.com/react-native-studio/react-native-android-barcodescanner

android扫码插件,解决android上zxing扫码慢的问题,该插件使用的是zbar
https://github.com/react-native-studio/react-native-android-barcodescanner

Last synced: 10 months ago
JSON representation

android扫码插件,解决android上zxing扫码慢的问题,该插件使用的是zbar

Awesome Lists containing this project

README

          

## react-native-android-barcodescanner [![npm version](https://badge.fury.io/js/react-native-android-barcodescanner.svg)](https://badge.fury.io/js/react-native-android-barcodescanner)
## 第一步
工程目录下运行 npm install --save react-native-android-barcodescanner 或者 yarn add react-native-android-barcodescanner(已经安装了yarn)

### 注意:
version 0.1.1适用于大于等于rn0.44和小于0.47

version 0.1.5适用于rn0.47及以上
加入``````权限
## 第二步
运行 react-native link react-native-android-barcodescanner
## 第三部使用
在工程中导入:
```bash
import ZbarScannerView from 'react-native-android-barcodescanner';
{ToastAndroid.show(JSON.stringify(data),ToastAndroid.SHORT)}}
hintText={''}
renderTopBarView={() => }
renderBottomMenuView={() => }
/>


```
## Props

![](https://github.com/MarnoDev/AC-QRCode-RN/blob/master/screenshots/ac-qrcode-props.jpg)

|Prop|Type|Default|Optional|
|:--:|:--:|:--:|:--:|
|maskColor|string|#0000004D|true|
|borderColor|string|#000000|true|
|cornerColor|string|#000000|true|
|borderWidth|number|0|true|
|cornerBorderWidth|number|4|true|
|cornerBorderLength|number|20|true|
|rectHeight|number|200|true|
|rectWidth|number|200|true|
|isCornerOffset|bool|false|true|
|cornerOffsetSize|number|0|true|
|bottomMenuHeight|number|0|true|
|scanBarAnimateTime|number|2500|true|
|scanBarColor|string|#22ff00|true|
|scanBarImage|any|null|true|
|scanBarHeight|number|1.5|true|
|scanBarMargin|number|6|true|
|hintText|string|将二维码/条码放入框内,即可自动扫描|true|
|hintTextStyle|object|{ color: '#fff', fontSize: 14,backgroundColor:'transparent'}|true|
|hintTextPosition|number|130|true|
|isShowScanBar|bool|true|true|
|bottomMenuStyle|object|-|true|
|renderTopBarView|func|-|flase|
|renderBottomMenuView|func|-|false|
|onScanResultReceived|func|-|false|