Import React Native Library in Pluggable Widget

2
How to import/link an external react native library in a pluggable widget project? React Native BLE Manager is a Bluetooth communication library. This library provides functions to scan Bluetooth devices like this: BleManager.scan([], 5, true) .then(() => { // Success code console.log('Scan started'); }); I want to link this into my project and create a Bluetooth manager widget for Mendix Native Apps. Any suggestions on how can I build a Mendix widget on top of it?  I also tried looking for an existing Bluetooth widget for Native Apps, but couldn’t find any.
asked
5 answers
1

Hi Umar,

Did you ever figure out how to add an external react native library to your pluggable widget?

answered
0

Consider using javascript actions and take a look the nanoflow commons library

 

answered
0

any solution to this?

answered
0

In a pluggable widget, you simply npm install the module you need. If you’re building a widget for a native app, and that library requires native code too, you’ll also need to install the module into a custom dev app.

In a JavaScript action, you can follow this guidance which suggests you include the code in the theme directory of your project. You can also copy the library into the /javascriptactions/mymodule/ folder of your project and import it from there.

answered
0

Hello 

Is there a solution for this? I have the same necessities, i need to connect my native app to a bluetooth printer.

I tried to implement using npm install on this https://www.npmjs.com/package/react-native-bluetooth-serial but still got no move forward.

 

answered