Android webview 使用HTTPS时有的图片不能加载

来源:互联网 发布:linux 总线 设备 驱动 编辑:程序博客网 时间:2024/04/29 20:11

Android webview 从Lollipop开始webview默认不允许混合模式,https当中不能加载http资源,需要设置开启。

Mixed content using HTTP and HTTPS on WebViews are disabled by default starting Lollipop. Is possible that is not working on devices with Lollipop? If this is the case, you can change the default WebView setting on Lollipop using:

webSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
Documentation here: http://developer.android.com/reference/android/webkit/WebSettings.html#setMixedContentMode(int)

阅读全文
0 0
原创粉丝点击