You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 12, 2023. It is now read-only.
Vibration.vibrate not working in react-native-qrcode-scanner http://facebook.github.io/react-native/docs/vibration#vibrate
if you take a look of the documentation, the first parameter of the function should be required, i am still not sure why it happens on IOS not android, but pls help to do necessary change.
How can it be reproduced?
<QRCodeScanner
reactivate={true}
vibrate={Platform.OS == "android"} // if i remove this line, the error occurs
reactivateTimeout= {5000}
onRead={this.onSuccess.bind(this)}
cameraStyle={styles.qrReaderCamera}
cameraProps={{ ratio:'1:1' }}
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>
}
/>
Build details?
happens in Windows 10 and mac
version 1.2.1
Snippet from your code
_handleBarCodeRead(e) {
if (!this.state.scanning && !this.state.disableVibrationByUser) {
if (this.props.vibrate) {
Vibration.vibrate(); // this is causing issue as the documentation required first parameter to be required
}
this._setScanning(true);
this.props.onRead(e);
if (this.props.reactivate) {
this._scannerTimeout = setTimeout(
() => this._setScanning(false),
this.props.reactivateTimeout
);
}
}
}
The text was updated successfully, but these errors were encountered:
Vibration.vibrate was called with 0 arguments but expects 1 arguments. If you haven't changed this method yourself, this usually means that your versions of the native code and JavaScript code are out of sync. Updating both should make this error go away.
What's happening?
Vibration.vibrate not working in react-native-qrcode-scanner
http://facebook.github.io/react-native/docs/vibration#vibrate
if you take a look of the documentation, the first parameter of the function should be required, i am still not sure why it happens on IOS not android, but pls help to do necessary change.
How can it be reproduced?
Build details?
happens in Windows 10 and mac
version 1.2.1
Snippet from your code
The text was updated successfully, but these errors were encountered: