android html5 webview
2016-08-10 15:51:52 0 举报
登录查看完整内容
android webview
作者其他创作
大纲/内容
android5.0 chromium
retrun
library
微信6.1
基础层提供http请求,基础工具包,诸葛,极光推送等第三方服务
push(mode)
app架构
控制层JS interface 负责衔接JS和java class方法JumpPush负责管理所有分发open Activity请求,(Html toActivity 和 Activity to Activity)library 是第三方应用如Umeng分享
JS interface
极光推送
jumpPush
交互流程
util
JS function
startActivity
locad storage
activity
android4.4chromium
缺点1、 android 4.1 4.2~43 4.4使用不同的浏览器内核 ,如在调用本地设备入相册时会无法正确获取数据2 、内存释放不及时,打开过多webview会导致内存泄露,3、 因为webview的缓存机制app运行时占用内存高3、需要通过Intent访问html5加载偏慢4、性能,安全度不如native5、对硬件和浏览器依赖度高
展示层WebView Activity 负责加载html5内容X5内核需要手机最少安装QQ5.3或微信6.1其中一个版本,而且必须打开过才可以使用。当没有检测到浏览器内核时将会使用系统自带内核。X5内核有两种方式1、依赖终端上的QQ或微信app版本 已发布2、自己下载浏览器内核,但是现在只在beta版 目前问题比较多
浏览器唤醒
applaction framework
html5
library (Umeng等)
JumpPush
Volley
X5
JS Interface
android 4.1 webkit
QQ5.3
浏览器内核对比 Webkit Chromium \t 备注 HTML5\t 278\t 434\t http://html5test.com/ 远程调试\t 不支持\t 支持\t Android 4.4及以上支持内存占用\t 小\t 大\t 相差20-30M左右WebAudio 不支持\t 支持\t Android 5.0及以上支持WebGL\t 不支持\t 支持\t Android 5.0及以上支持WebRTC\t 不支持\t 支持\t Android 5.0及以上支持腾讯X5因为无法找到相关性能数据应该接近最新版的chromium 但是可以从android 4.1兼容到 6.0android 4.1 4.3使用的webkit内核android 4.4起开始使用chromium 但是到了5.0版本才开始变得稳定
0 条评论
回复 删除
下一页