0.2.5 • Published 3 years ago
react-native-pure-code-view v0.2.5
react-native-pure-code-view
There are three native views in this module.
- BarCodeView: a barcode generator
- QRCodeView: a qrcode generator
- CodeScanner: a scanner which can recognizes barcode and qrocde
Installation
npm i react-native-pure-code-view
// link below 0.60
react-native link react-native-pure-code-view
Setup
iOS
Add NSCameraUsageDescription
in your ios/${ProjectName}/Info.plist
:
<key>NSCameraUsageDescription</key>
<string>balabala</string>
Android
Add jitpack
in your android/build.gradle
at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Usage
import {
BarCodeView,
QRCodeView,
CodeScanner,
} from 'react-native-pure-code-view'
// BarCodeView
<BarCodeView
text="xx",
style={styles.barcode}
/>
// QRCodeView
<QRCodeView
text="xx",
style={styles.qrcode}
/>
// At first, make sure you have the permissions.
// ios: CAMERA
// android: CAMERA
// If you don't have these permissions, you can't use CodeScanner.
// CodeScanner
<CodeScanner
title="将二维码放入框内,即可自动扫描"
onScanSuccess={this.handleScanSuccess}
style={styles.codeScanner}
/>
0.2.5
3 years ago
0.2.4
5 years ago
0.2.3
5 years ago
0.2.2
5 years ago
0.2.1
5 years ago
0.2.0
5 years ago
0.1.8
5 years ago
0.1.9
5 years ago
0.1.7
6 years ago
0.1.6
6 years ago
0.1.5
6 years ago
0.1.4
6 years ago
0.1.3
6 years ago
0.1.2
6 years ago
0.1.1
6 years ago
0.1.0
6 years ago
0.0.9
6 years ago
0.0.8
6 years ago
0.0.7
6 years ago
0.0.6
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago