[LayaNative3]安卓native里面怎么js发送消息

官方文档里面js向native发消息看到了 
conch.postAsyncMessage    
但是没找到native向js发消息的方法  
在java文件里面找到了ConchJNI.postMsgToRuntime 
能运行,但是在js里面监听不到
有其他好的方法没  ?
 
已邀请:

layabox

赞同来自:

看这个文档

https://layaair.com/3.x/doc/released/native/platform_communication/readme.html

 
平台代码(Android/iOS)主动执行js脚本
iOS/OC执行JS脚本:
  [[conchRuntime GetIOSConchRuntime] runJS:@"alert('hello')"];

Android/Java执行JS脚本:
  ConchJNI.RunJS("alert('hello world')");

该问题目前已经被锁定, 无法添加新回复

商务合作
商务合作