cpunion / react-native-barcode-scanner-universal Goto Github PK
View Code? Open in Web Editor NEW[DEPRECATED] Please use react-native-camera
[DEPRECATED] Please use react-native-camera
Hi,
Im trying to open an alert when I scan a code, but the scanner keeps running, making various alerts
heres what I have..
<View style={{backgroundColor:'white',flex:1, justifyContent: 'center'}}>
<View style={{width: window.width, height: window.height, alignItems: 'center'}}>
<BarcodeScanner
onBarCodeRead={(code) asd(code}
style={styles.camera}>
{scanArea}
</BarcodeScanner>
</View>
</View>
function asd(c) {
console.log('asdsadsa');
if (Platform.OS === 'ios') {
AlertIOS.alert(
'Scan Complete',
c.data,
);
}
}
any fix? thanks
error undefined is not an object(evaluating cameramanage.aspect)
I have performed the command
rnpm link react-native-camera
rnpm link react-native-barcodescanner
Camera has no propType for native prop RCTCamera.ToPreview of native type BOOL
Does this mean, the android phone does not support a used native Library?
barcode scanner is crashes in ios version:9.3.2 using react-native version:0.25.1 and react-native-barcode-scanner-universal version:1.0.5 may i know that what is the problem
"Seems you're trying to access 'ReactNative.createClass' from the 'react-native' package. ...
If any one have solution then help us?
Title pretty much says it all.. I do this:
<View style={{backgroundColor:'white',flex:1, justifyContent: 'center'}}>
<View style={{width: window.width, height: 400}}>
<BarcodeScanner
onBarCodeRead={(code) => console.log(code)}
style={styles.container}>
</BarcodeScanner>
</View>
</View>
But the camera is compressed, which I obviously dont want.
thanks for help
How I can fix this issues?
android 7.0 above the full screen will become blurred ,but android 6 following full screen no problem
The code is as follows:
let scanArea = null
if (Platform.OS === 'ios') {
scanArea = (
<View style={styles.rectangleContainer}>
<View style={styles.rectangle} />
</View>
)
}
<BarcodeScanner
onBarCodeRead={(code) => this.onBarCodeRead(code)}
style={styles.camera}
torchMode={this.state.torchMode}
cameraType={this.state.cameraType}
defaultOnFocusComponent={true}
showViewFinder={false}
viewFinderDrawLaser={false}
viewFinderShowLoadingIndicator={false}
>
{scanArea}
</BarcodeScanner>
camera: {
flex: 1,
backgroundColor:'rgba(0, 0, 0, 0.3)'
},
Question is - should we fork and disable it? I want to see how you ask for microphone permission when using the camera for a QR code...
It installs react-native-barcodescanner 1.0.1 which doesn't work with RN >=0.29
到扫描界面后只出现个框,没有调用到摄像头。也不报错
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.