Closed iliadeviatov closed 4 years ago
Hi tried using the code snipper to send a broadcast from javascript to native with some data and the fireNativeEvent promise always resolves to error:
this.broadCaster .fireNativeEvent("com.service.print", { extras: { item: "test data" } }) .then((result) => { console.log("broadcast sent:" + result); }) .catch((error) => { console.log("Error sending broadcast:" + error); });
here is the original question on SO
Figured it out, added the answer on SO
Hi tried using the code snipper to send a broadcast from javascript to native with some data and the fireNativeEvent promise always resolves to error:
this.broadCaster .fireNativeEvent("com.service.print", { extras: { item: "test data" } }) .then((result) => { console.log("broadcast sent:" + result); }) .catch((error) => { console.log("Error sending broadcast:" + error); });
here is the original question on SO