react-native-mendix-receiver
v1.1.1
Published
Receiver bridge for Mendix Native Widgets using React Native
Downloads
8
Maintainers
Readme
Getting started
$ npm install react-native-mendix-receiver --save
Android
For android Only
Mendix
import "mx-global"; import { Big } from "big.js"; import { ZebraBarcode } from 'react-native-mendix-broadcastreceiver';
// BEGIN EXTRA CODE export const barcode = new ZebraBarcode(); this.barcode = barcode; // END EXTRA CODE
/**
@returns {Promise.} */ export async function react_zebra() { // BEGIN USER CODE this.barcode.listenerBarcode("com.dwbasicintent1.ACTION", (strBarcode) => { mx.data.create({ entity: "NativeModule.ExampleBarcode", callback: function(mxObject) { mxObject.set("Barcode", strBarcode);
mx.data.commit({ mxobj: mxObject, callback: function() { mx.data.update({ entity: "NativeModule.ExampleBarcode", }); }, error: function(e) { console.log("Error occurred attempting to commit: " + e); } }); }, error: function(e) { reject("Could not create object:" + error.message); } });}); // END USER CODE }
Android Studio
Path : android\app\src\main
