update react-native-camera-kit

This commit is contained in:
Evan
2020-01-22 20:58:27 -05:00
parent e1f36049f9
commit 92d07d17dc
4 changed files with 20 additions and 4 deletions
+17 -2
View File
@@ -3,6 +3,10 @@ import { Platform, StyleSheet, Text, View } from 'react-native';
import { Header, Icon } from 'react-native-elements';
import ActivityResult from 'react-native-activity-result-fork';
import Permissions from 'react-native-permissions';
import {
CameraKitCamera,
CameraKitCameraScreen
} from 'react-native-camera-kit';
const QRINTENT = 'com.google.zxing.client.android.SCAN';
@@ -66,7 +70,6 @@ export default class QRCodeScanner extends React.Component<QRProps, QRState> {
}
async componentDidMount() {
/*
// When on Android we'll try to use the external scanner
if (Platform.OS === 'android') {
this.startExternalQRScanner();
@@ -80,7 +83,6 @@ export default class QRCodeScanner extends React.Component<QRProps, QRState> {
this.setState({ hasCameraPermission: true });
}
}
*/
}
async componentDidUpdate() {
@@ -135,6 +137,19 @@ export default class QRCodeScanner extends React.Component<QRProps, QRState> {
<View style={styles.content}>
<Text>{text}</Text>
</View>
<CameraKitCameraScreen
laserColor={'orange'}
scanBarcode={true}
onReadCode={(event: any) => {
this.setState({ complete: true });
handleQRScanned(event.nativeEvent.codeStringValue);
}}
hideControls={true}
showFrame={false}
style={{
flex: 1
}}
/>
</React.Fragment>
);
}
+1
View File
@@ -37,6 +37,7 @@ target 'zeus' do
pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'
pod 'RealmJS', :path => '../node_modules/realm'
pod 'react-native-camera-kit', :path => '../node_modules/react-native-camera-kit'
target 'zeusTests' do
inherit! :search_paths
+1 -1
View File
@@ -391,6 +391,6 @@ SPEC CHECKSUMS:
RNVectorIcons: 0bb4def82230be1333ddaeee9fcba45f0b288ed4
Yoga: f2a7cd4280bfe2cca5a7aed98ba0eb3d1310f18b
PODFILE CHECKSUM: 4fe76220fd560a9cadff6d3659a347726d6e0191
PODFILE CHECKSUM: fa177d69d31efb92c8bf5b084b33ad8e992a0e52
COCOAPODS: 1.8.4
+1 -1
View File
@@ -589,8 +589,8 @@
buildPhases = (
94307FFD63DDB13725667C01 /* [CP] Check Pods Manifest.lock */,
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
97710D0923B7FFEA006C4464 /* ShellScript */,
23DFF9ED4667678806271F36 /* [CP] Copy Pods Resources */,