Comments (6)
@moaazsidat there is a bug in this module. When you try to navigate to another component and come back to scanner it closes the app.
render() {
return (
<QRCodeScanner
onRead={this.onSuccess.bind(this)}
containerStyle={{backgroundColor: '#ffffff'}}
showMarker={true}
topViewStyle={{flex: 0, height: 0}}
bottomContent={(
<TouchableOpacity onPress={this.gotoHome}>
<Text>OK. Got it!</Text>
</TouchableOpacity>
)}
ref={(node) => { this.scanner = node }}
reactivate = {true}
reactivateTimeout = {5000}
/>
);
}
gotoHome = () => {
this.props.navigation.navigate('Home');
}
from react-native-qrcode-scanner.
Hey @victorsferreira, will take a look at ReactNavigation, and try to add a couple of examples using it. Since this is just a react component, you should generally be able to use it as any other component.
import QRCodeScanner from 'react-native-qrcode-scanner'
<QRCodeScanner
title='Scan Code'
onRead={() => alert('Success')}
topContent={(
<Text style={styles.centerText}>
Go to <Text style={styles.textBold}>wikipedia.org/wiki/QR_code</Text> on your computer and scan the QR code.
</Text>
)}
bottomContent={(
<TouchableOpacity style={styles.buttonTouchable}>
<Text style={styles.buttonText}>OK. Got it!</Text>
</TouchableOpacity>
)}
/>
from react-native-qrcode-scanner.
@imomer @victorsferreira Any solution on this? I'm having this issue when creating a StackNavigator with this Component.
from react-native-qrcode-scanner.
@lucasharada well didn't find a solution but I have worked around it
from react-native-qrcode-scanner.
@imomer Can you show us how you did it?
from react-native-qrcode-scanner.
@imomer Can you please show us the workaround? The app also crashes...
from react-native-qrcode-scanner.
Related Issues (20)
- Incompability when using react-native-permissions 2.0.2 (from this package) and in parallel with react-native-permissions 3.6.0 HOT 1
- Check if user has denied or accepted camera permission in real time
- this lib is dead? HOT 1
- Keeps adding extra digit to Start/End of actual barcode if it's less than 13 numbers HOT 2
- Kindly Remove/Archive this package.
- Unable to use QRCodeScanner HOT 9
- Invariant Violation: View config getter callback for component `AndroidProgressBar` must be a function (received `undefined`).
- After react native 0.70 upgrade, It crashes. HOT 3
- can't scan HOT 1
- scan HOT 1
- How to re request permission? HOT 1
- repeat scan HOT 1
- [Release] App Show White Screen HOT 2
- For IOS getting ERROR TypeError: null is not an object (evaluating 'NativeModule.requestPermission' HOT 7
- ViewPropTypes is back on React Native 0.71 HOT 7
- Keeps repeating scanning same qr code multiple times HOT 3
- sensitive is low for catch barcode HOT 4
- How can I user proguard-rules in it.
- react-native-permissions: NativeModule.RNPermissions is null HOT 6
- what can i do if i'm use only barcode scanner instead of QR code scanner
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-qrcode-scanner.