Comments (9)
I got the issue, There is problem with scanBarStyle, just remove the scanBarStyle if you have set to QRScannerView.
from react-native-qrcode-scanner-view.
Hi, i met the same problem, and i use it like this way.
import React, { Component } from 'react';
import { SafeAreaView, Text, StyleSheet } from 'react-native';
import { QRScannerRectView } from 'react-native-qrcode-scanner-view';
import UI from '~/modules/UI';
import { Toast } from 'teaset';
import { RNCamera } from 'react-native-camera';
class CodeScan extends Component {
constructor(props) {
super(props);
this.state = {};
}
static navigationOptions = {
title: '扫一扫',
};
renderTitleBar = () => <Text style={styles.text}>扫一扫</Text>;
renderMenu = () => <Text style={styles.text} />;
barcodeReceived = event => {
const { navigation } = this.props;
if (event.data.indexOf('http') !== -1 || event.data.indexOf('https') !== -1) {
navigation.navigate('myWeb', { url: event.data });
}
};
render() {
return (
<SafeAreaView style={{ flex: 1 }}>
<RNCamera
style={styles.preview}
onBarCodeRead={this.barcodeReceived}
renderFooterView={this.renderMenu}
scanBarAnimateReverse
>
<QRScannerRectView />
</RNCamera>
</SafeAreaView>
);
}
}
const styles = StyleSheet.create({
text: {
color: 'white',
textAlign: 'center',
padding: UI.scaleSize(16),
},
preview: {
flex: 1,
},
});
export default CodeScan;
Best wishes
from react-native-qrcode-scanner-view.
I had the same problem with you, is there anyone resolve this issue?
from react-native-qrcode-scanner-view.
Any possibility that this will be addressed and fixed?
from react-native-qrcode-scanner-view.
hintTextStyle also causes this problem
from react-native-qrcode-scanner-view.
There is also similar problem on iOS related to setting property scanBarStyle
Argument 0 (NSNumber) of RNCameraManger.pausePreview must not be null.
It happens when you navigate second time to the screen which contains scanner component.
from react-native-qrcode-scanner-view.
scanBarStyle and hintTextStyle have the same error
from react-native-qrcode-scanner-view.
我也遇到这个问题了
from react-native-qrcode-scanner-view.
Facing same issue. any solution?
from react-native-qrcode-scanner-view.
Related Issues (20)
- 条码要竖着才能扫,也就是说相机打开要旋转90°才能扫描条形码。
- 适应最新的RN 后,报找不到compoent
- Toast is not defined
- TMD就没成功过,果断放弃。rn最新版的各种错误。放弃吧
- demo 可以运行,只不过扫描的时候出现了空白的情况。 HOT 6
- 该更新一下啦
- Readme文档代码错误 HOT 3
- 第一次进入路由页面没有相机权限就会直接闪退 HOT 8
- 更改样式报错 HOT 2
- android 从扫描界面 返回去的时候 会卡顿 希望修复一下 苹果无问题 HOT 2
- android release crash HOT 1
- 安卓扫描页面显示白屏
- 使用教程详细点?
- 增加torchOn属性并不能打开闪光灯 HOT 1
- Could not resolve project :react-native-camera.
- 能否限定扫描类型?
- 教程错误
- check if device has flash
- RNCamera device doesn't support flash mode
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-view.