JS调用Android原生

可以参考下这篇博客

https://blog.csdn.net/weixin_41620505/article/details/88758179

我这里只说一点test名字是随意取的,js调用时的形式应该是window.test.xxx 其中xxx是原生的方法
webView.addJavascriptInterface(this, "test");

猜你喜欢

转载自www.cnblogs.com/ft039x/p/11647003.html