Skip to content

Commit eddf7e0

Browse files
update code
1 parent 10bbe87 commit eddf7e0

File tree

1 file changed

+5
-5
lines changed
  • BarcodeReaderSimpleSample

1 file changed

+5
-5
lines changed

BarcodeReaderSimpleSample/App.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@ class App extends React.Component {
4141
// Apply the new runtime settings to the barcode reader.
4242
await this.reader.updateRuntimeSettings(settings);
4343

44-
// Enable video barcode scanning.
45-
// If the camera is opened, the barcode reader will start the barcode decoding thread when you triggered the startScanning.
46-
// The barcode reader will scan the barcodes continuously before you trigger stopScanning.
47-
await this.reader.startScanning();
48-
4944
// Add a result listener. The result listener will handle callback when barcode result is returned.
5045
this.reader.addResultListener((results) => {
5146
// Update the newly detected barcode results to the state.
5247
this.setState({results: results})
5348
})
49+
50+
// Enable video barcode scanning.
51+
// If the camera is opened, the barcode reader will start the barcode decoding thread when you triggered the startScanning.
52+
// The barcode reader will scan the barcodes continuously before you trigger stopScanning.
53+
this.reader.startScanning();
5454
})();
5555

5656

0 commit comments

Comments
 (0)