react-native-fast-qrcode-scanner
v0.1.0
Published
Support for scan QRCode
Readme
react-native-fast-qrcode-scanner
Support for scan QRCode
IOS
At ios/info.plist add:
<key>NSCameraUsageDescription</key>
<string>Allow access to the camera to scan QR codes</string>
<!-- optionally, if you want to record audio: -->
<key>NSMicrophoneUsageDescription</key>
<string>Allow access to the Microphone</string>Android
At: /android/app/src/main/AndroidManifest.xml
<uses-permission android:name="android.permission.CAMERA" />
<!-- optionally, if you want to record audio: -->
<uses-permission android:name="android.permission.RECORD_AUDIO" />Installation
npm install react-native-fast-qrcode-scannerUsage
import { StyleSheet, View } from 'react-native';
import { FastQRCodeScanner } from 'react-native-fast-qrcode-scanner';
export default function App() {
return (
<View style={styles.container}>
<FastQRCodeScanner
style={styles.box}
onQrCodeScanned={(e) => {
console.log('value', e?.nativeEvent?.value);
}}
startCamera={true}
/>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
box: {
width: '100%',
height: '100%',
},
});
Contributing
License
MIT
Made with create-react-native-library
