@scrumble-nl/react-native-honeywell-scanner 1.0.50 → 1.0.52
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,20 +79,12 @@ public class HoneywellScannerModule extends ReactContextBaseJavaModule implement
|
|
|
78
79
|
|
|
79
80
|
@ReactMethod
|
|
80
81
|
public void startBarcodeDeviceListener() {
|
|
81
|
-
|
|
82
|
+
addBarcodeDeviceListener(new BarcodeDeviceListener() {
|
|
82
83
|
@Override
|
|
83
|
-
public void
|
|
84
|
-
|
|
85
|
-
params.putString("data", connectedDevice);
|
|
86
|
-
sendEvent(BARCODE_READ_SUCCESS, params);
|
|
84
|
+
public void onBarcodeDeviceConnectionEvent(BarcodeDeviceConnectionEvent event) {
|
|
85
|
+
connectedDevice = event.getBarcodeReaderInfo().getName();
|
|
87
86
|
}
|
|
88
|
-
})
|
|
89
|
-
|
|
90
|
-
// AidcManager.addBarcodeDeviceListener(new BarcodeDeviceListener() {
|
|
91
|
-
// public void onBarcodeDeviceConnectionEvent(BarcodeDeviceConnectionEvent event) {
|
|
92
|
-
// connectedDevice = event.getBarcodeReaderInfo().getName();
|
|
93
|
-
// }
|
|
94
|
-
// });
|
|
87
|
+
})
|
|
95
88
|
}
|
|
96
89
|
|
|
97
90
|
// @ReactMethod
|
package/package.json
CHANGED