How to user BroadcastReceiver in javascript?

I’m building zebra barcode  scanner app using mendix native app, scanner can send data using android intent, Before in java i use BroadcastReceiver to capture barcode data, but right now i need to develop using mendix and i’m lost on how to use react native npm BroadcastReceiver in mendix, or is it impossible to do?
1 answers

In the end i have create reactnative library to call BroadcastReceiver,

So for now my mendix app call nanoflow every second, in nanoflow call javascript and it call java android. and in java there BroadcastReceiver that capture barcode value save to variable, so when nanoflow call it just take value from variable in java.


Now the question is, is there anyway to create call back from javascript to nanoflow?

so i want to create value from java android call to javascript (mendix) and run nanoflow to save my barcode value