一、 调用案例
1、Android 中定义方法
package cn.tellsea;
/**
* 测试
*
* @author Tellsea
*/
public class TestMethod {
public void add(String param) {
System.out.println("接收参数:" + param);
}
}
2、JavaScript 调用方法
使用 plus 方法必须是在打包为 App 的前提下,要不然 plus 未定义
let TestMethod = plus.android.importClass("cn.tellsea.TestMethod");
let testMethod = new TestMethod();
testMethod.add(param);