@scrumble-nl/react-native-honeywell-scanner 1.0.49 → 1.0.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,7 @@ import com.facebook.react.bridge.*;
10
10
  import com.facebook.react.modules.core.DeviceEventManagerModule;
11
11
  import com.honeywell.aidc.*;
12
12
  import com.honeywell.aidc.AidcManager.CreatedCallback;
13
+ import com.honeywell.aidc.AidcManager.*;
13
14
 
14
15
  import javax.annotation.Nullable;
15
16
 
@@ -78,17 +79,11 @@ public class HoneywellScannerModule extends ReactContextBaseJavaModule implement
78
79
 
79
80
  @ReactMethod
80
81
  public void startBarcodeDeviceListener() {
81
- AidcManager.create(reactContext, new CreatedCallback() {
82
- WritableMap params = Arguments.createMap();
83
- params.putString("data", connectedDevice);
84
- sendEvent(BARCODE_READ_SUCCESS, params);
85
- });
86
-
87
- // AidcManager.addBarcodeDeviceListener(new BarcodeDeviceListener() {
88
- // public void onBarcodeDeviceConnectionEvent(BarcodeDeviceConnectionEvent event) {
89
- // connectedDevice = event.getBarcodeReaderInfo().getName();
90
- // }
91
- // });
82
+ addBarcodeDeviceListener(BarcodeDeviceListener listener) {
83
+ listener.onBarcodeDeviceConnectionEvent(BarcodeDeviceConnectionEvent event) {
84
+ connectedDevice = event.getBarcodeReaderInfo().getName();
85
+ }
86
+ };
92
87
  }
93
88
 
94
89
  // @ReactMethod
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scrumble-nl/react-native-honeywell-scanner",
3
3
  "title": "React Native Honeywell Scanner-v2",
4
- "version": "1.0.49",
4
+ "version": "1.0.51",
5
5
  "description": "Bridge to use the Honeywell scanner",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",