@scrumble-nl/react-native-honeywell-scanner 1.0.21 → 1.0.23

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.
@@ -3,6 +3,7 @@ package com.reactlibrary;
3
3
  import android.os.Build;
4
4
  import android.util.Log;
5
5
  import android.app.AlertDialog;
6
+ import android.content.DialogInterface;
6
7
 
7
8
  import com.facebook.react.bridge.*;
8
9
  import com.facebook.react.modules.core.DeviceEventManagerModule;
@@ -82,10 +83,22 @@ public class HoneywellScannerModule extends ReactContextBaseJavaModule implement
82
83
  reader = manager.createBarcodeReader();
83
84
  connected = manager.listConnectedBarcodeDevices();
84
85
 
86
+ AlertDialog.Builder builder = new AlertDialog.Builder(reactContext);
87
+ builder.setTitle("Devices");
88
+ builder.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
89
+ public void onClick(DialogInterface dialog) {
90
+ dialog.cancel();
91
+ }
92
+ });
93
+ builder.setNegativeButton("No", new DialogInterface.OnClickListener() {
94
+ public void onClick(DialogInterface dialog) {
95
+ dialog.cancel();
96
+ }
97
+ });
98
+ builder.setMessage(connected.get(0).getName());
85
99
 
86
- new AlertDialog.Builder(reactContext).setTitle("devices").setMessage(
87
- connected.get(0).getName() + " " + connected.get(1).getName()
88
- ).show();
100
+ AlertDialog alert = builder.create();
101
+ alert.show();
89
102
 
90
103
  // for (int i = 0; i < connected.size(); i++) {
91
104
  // Log.i("ReactNative", connected.get(i).getName());
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.21",
4
+ "version": "1.0.23",
5
5
  "description": "Bridge to use the Honeywell scanner",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",