TinyWebVIew: 一个Android处理js和native交互的框架

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/ddnosh/article/details/85523294

项目地址

https://github.com/ddnosh/android-tiny-webview
在这里插入图片描述

功能介绍

  1. 提供一个BaseWebView,包括基础的webview功能;
  2. 提供异步处理js和native交互的功能;
  3. 提供延迟处理js和native交互的功能;
  4. 提供Handler处理专门的业务;

用法

  1. 实现自己的Handler: YourHandler extends BaseJsApiHandler;
  2. 注册自己的Handler: JsApiRegisterFactory.register(new YourHandler());
  3. 实现自己的WebVIew, 比如: TinyWebView extends BaseWebView implements JsInterface, LoadJsCallback;

TODO

  1. 优化demo;

猜你喜欢

转载自blog.csdn.net/ddnosh/article/details/85523294