Merge pull request #1 from superyarik/superyarik-onBarCodeRead-example
Create README.md
This commit is contained in:
commit
090aadc30d
|
@ -120,6 +120,7 @@ class BadInstagramCloneApp extends Component {
|
|||
ref={(cam) => {
|
||||
this.camera = cam;
|
||||
}}
|
||||
onBarCodeRead={this.onBarCodeRead.bind(this)}
|
||||
style={styles.preview}
|
||||
aspect={Camera.constants.Aspect.fill}>
|
||||
<Text style={styles.capture} onPress={this.takePicture.bind(this)}>[CAPTURE]</Text>
|
||||
|
@ -128,6 +129,13 @@ class BadInstagramCloneApp extends Component {
|
|||
);
|
||||
}
|
||||
|
||||
onBarCodeRead(e) {
|
||||
console.log(
|
||||
"Barcode Found!",
|
||||
"Type: " + e.type + "\nData: " + e.data
|
||||
);
|
||||
}
|
||||
|
||||
takePicture() {
|
||||
const options = {};
|
||||
//options.location = ...
|
||||
|
|
Loading…
Reference in New Issue