Closed gergobalogh closed 3 years ago
You need to send an event to the JS thread - you can read about this in the react-native docs.
Something like this:
private void emitJSEvent(String eventName, String message) {
wrapperContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
.emit(eventName, message);
}
Thanks. I figured it out and did it as you suggested. If anybody else hits this problem feel free to PM me. getReactApplicationContext() .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) .emit(key, payload);
Hi @gergo-balogh and @crobinson42, Just wanted to let you know that we have an official react native module available now (in alpha state). It's available here:
I've downloaded the android-samples-astudio and managed to install/run it, scan barcodes with the skorpio x4 and display them in EditText. I can't manage to get the value through to react-native. When there is no EditText as it is in the example app, the execution doesn't even enter in the TRY part :