react-native-qrcode-scanner
react-native-qrcode-scanner copied to clipboard
trouble on camera after scanning code
What's happening?
After the qrcode is scanning and the app go to the next screen, the camera do something like zig zag only on the android, on ios works well.
How can it be reproduced?
` constructor(props) { super(props); this.state = { acitivateCam: false, dialogVisible: false, reactivate: false }; }
// On sucess
onSuccess(e) {
this.props.searchUserGlobal({
data: {
qrcode: e.data
},
success: data => {
if (data.length > 0) {
let userID = data[0].id;
this.props.detialUser({
userID: userID,
success: userDetailData => {
if (userDetailData.roles === undefined) {
userDetailData.roles = [];
}
this.props.navigation.navigate("ProfileStatus", {
user: userDetailData,
config: this.props.config.payload
});
},
error: error => {
alert(error);
}
});
} else {
setTimeout(() => {
alert(translate("not_found"));
}, 600);
}
},
error: () => {
setTimeout(() => {
this.scanner.reactivate();
alert(translate("not_found"));
}, 600);
}
});
}
<QRCodeScanner onRead={this.onSuccess.bind(this)} ref={node => { this.scanner = node; }} showMarker={true} reactivateTimeout={400} reactivate={true} fadeIn={false} vibrate={true} cameraProps={{ captureAudio: false }} />
Build details?
device: android react-native-camera: "^2.1.1" react-native-qrcode-scanner: "^1.0.1"
@moaazsidat could you please take a look at this?
I'm still getting this issue. ReactiveTimeout doesn't work.
@acerbastimur I have fixed the issue by deleting NavigationWithFocus in my component