react-native-honeywell-scanner-trigger
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "react-native-honeywell-scanner-trigger", | ||
"description": "A barcode scanner for Honeywell handheld devices like Honeywell Dolphin CT40", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "author": "Subramanian Ramaswamy <subramanian.ramaswamy@ingrammicro.com>", |
@@ -12,2 +12,6 @@ # React Native Honeywell Scanner With Soft Trigger | ||
``` | ||
npm install react-native-honeywell-scanner-trigger | ||
(Or) | ||
yarn add react-native-honeywell-scanner-trigger | ||
@@ -89,6 +93,24 @@ ``` | ||
``` | ||
Soft Trigger | ||
Below logic would ensure you have soft trigger handling. This will toggle the scan button in your application | ||
```js | ||
HoneywellScanner.softwareTriggerStart((error, name) => { | ||
setApiErrorMessage(error != null ? error : name); | ||
}); | ||
setTimeout(() => { | ||
HoneywellScanner.softwareTriggerStop((error, name) => { | ||
setApiErrorMessage(error != null ? error : name); | ||
}); | ||
}, 2000); | ||
``` | ||
## Inspiration | ||
The [react-native-bluetooth-serial](https://github.com/rusel1989/react-native-bluetooth-serial) project was used as inspiration. [cordova-honeywell](https://github.com/icsfl/cordova-honeywell) also served as some inspiration. | ||
## Sample React Native APP illustrating the above soft trigger capability | ||
Clone the [Project](https://github.com/subramanianr/react-native-app-illustrator-with-scan-trigger-app). Follow the README to build and generate APK. Happy Testing! |
Sorry, the diff of this file is not supported yet
159571
115