Skip to content

Commit

Permalink
Merge pull request fbacker#1 from superyarik/superyarik-onBarCodeRead…
Browse files Browse the repository at this point in the history
…-example

Create README.md
  • Loading branch information
superyarik authored Jun 8, 2017
2 parents acc60d3 + 7755419 commit 090aadc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,21 @@ 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>
</Camera>
</View>
);
}

onBarCodeRead(e) {
console.log(
"Barcode Found!",
"Type: " + e.type + "\nData: " + e.data
);
}

takePicture() {
const options = {};
Expand Down

0 comments on commit 090aadc

Please sign in to comment.