Skip to content

Commit a255e3e

Browse files
committed
init
1 parent f9b622a commit a255e3e

File tree

3 files changed

+36
-10
lines changed

3 files changed

+36
-10
lines changed

README.md

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,36 @@
11
# react-native-esb24-honeywell-scanner
22

3+
This module is fork of react-native-honeywell-scanner with enabled EAN13 digit check transmit property.
4+
35
## Getting started
46

57
`$ npm install react-native-esb24-honeywell-scanner --save`
68

7-
### Mostly automatic installation
8-
9-
`$ react-native link react-native-esb24-honeywell-scanner`
10-
119
## Usage
1210
```javascript
1311
import Esb24HoneywellScanner from 'react-native-esb24-honeywell-scanner';
1412

15-
// TODO: What to do with the module?
16-
Esb24HoneywellScanner;
17-
```
13+
...
14+
15+
useEffect(() => {
16+
if( Esb24HoneywellScanner.isCompatible ) {
17+
Esb24HoneywellScanner.startReader().then((claimed) => {
18+
console.log(claimed ? 'Barcode reader is claimed' : 'Barcode reader is busy');
19+
Esb24HoneywellScanner.onBarcodeReadSuccess(event => {
20+
console.log('Received data', event.data);
21+
});
22+
23+
});
24+
25+
26+
return(
27+
() => {
28+
Esb24HoneywellScanner.stopReader().then(() => {
29+
console.log("Freedom!!");
30+
Esb24HoneywellScanner.offBarcodeReadSuccess();
31+
});
32+
}
33+
)
34+
}
35+
}, []);
36+
```

android/.idea/workspace.xml

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "react-native-esb24-honeywell-scanner",
33
"title": "React Native Esb24 Honeywell Scanner",
44
"version": "1.0.2",
5-
"description": "TODO",
5+
"description": "Module for honeywell scanner with enabled EAN13 digit check transmit property",
66
"main": "index.js",
77
"scripts": {
88
"test": "echo \"Error: no test specified\" && exit 1"

0 commit comments

Comments
 (0)