Fast QR Code Scanner for Android based on https://github.com/ZBar/ZBar
npm install react-native-zbar-android --save
react-native link react-native-zbar-android
import { startScan } from 'react-native-zbar-android'
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
ToastAndroid,
View
} from 'react-native';
class MyPickers extends Component {
render () {
startScan(this._onBarCodeRead.bind(this))
return (
<View/>
)
}
_onBarCodeRead (QRCodeResult) {
if (QRCodeResult.state === 'ok') {
let result = QRCodeResult.code
ToastAndroid.show(result, ToastAndroid.SHORT);
}
}
}
Feel free to open an issue