Skip to content

Commit

Permalink
fix(fixed): fix android discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
tr3v3r committed Jul 26, 2024
1 parent 6db5ff2 commit b5275ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
public class EscPosPrinterDiscoveryModule extends ReactContextBaseJavaModule implements ActivityEventListener {

private Context mContext;
private WritableArray mPrinterList = null;
private final ReactApplicationContext reactContext;

public static final String NAME = "EscPosPrinterDiscovery";
Expand Down Expand Up @@ -154,6 +155,7 @@ private void sendEvent(ReactApplicationContext reactContext, String eventName, @
@ReactMethod
private void startDiscovery(final ReadableMap paramsMap, Promise promise) {
FilterOption mFilterOption = getFilterOptionsFromParams(paramsMap);
mPrinterList = Arguments.createArray();

try {
Discovery.start(mContext, mFilterOption, mDiscoveryListener);
Expand Down Expand Up @@ -217,7 +219,6 @@ public void onDiscovery(final DeviceInfo deviceInfo) {
UiThreadUtil.runOnUiThread(new Runnable() {
@Override
public synchronized void run() {
WritableArray mPrinterList = Arguments.createArray();
WritableMap printerData = Arguments.createMap();


Expand Down
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ PODS:
- React-jsinspector (0.72.6)
- React-logger (0.72.6):
- glog
- react-native-esc-pos-printer (4.0.0-beta.0):
- react-native-esc-pos-printer (4.0.0):
- RCT-Folly (= 2021.07.22.00)
- React-Core
- react-native-image-picker (7.1.0):
Expand Down Expand Up @@ -605,7 +605,7 @@ SPEC CHECKSUMS:
React-jsiexecutor: 3bf18ff7cb03cd8dfdce08fbbc0d15058c1d71ae
React-jsinspector: 194e32c6aab382d88713ad3dd0025c5f5c4ee072
React-logger: cebf22b6cf43434e471dc561e5911b40ac01d289
react-native-esc-pos-printer: fec3d0d7ceae92e2e4b104e4ecc3984d5c8ab047
react-native-esc-pos-printer: 7d9eadb4e6a43b01515defe2bc4ad897e1d83145
react-native-image-picker: 5e076db26cd81660cfb6db5bcf517cfa12054d45
react-native-safe-area-context: 2cd91d532de12acdb0a9cbc8d43ac72a8e4c897c
React-NativeModulesApple: 02e35e9a51e10c6422f04f5e4076a7c02243fff2
Expand Down

0 comments on commit b5275ae

Please sign in to comment.