Comments (1)
- webView加载一些别人的url时候,有时候会发生证书认证错误的情况,这时候我们希望能够正常的呈现页面给用户,我们需要忽略证书错误,需要调用WebViewClient类的onReceivedSslError方法,调用handler.proceed()来忽略该证书错误。
/** * 在加载资源时通知主机应用程序发生SSL错误 * 作用:处理https请求 * @param view view * @param handler handler * @param error error */ @Override public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) { super.onReceivedSslError(view, handler, error); if (error!=null){ String url = error.getUrl(); X5WebUtils.log("onReceivedSslError----异常url----"+url); } //https忽略证书问题 if (handler!=null){ //表示等待证书响应 handler.proceed(); // handler.cancel(); //表示挂起连接,为默认方式 // handler.handleMessage(null); //可做其他处理 } }
from ycwebview.
Related Issues (20)
- 打开相册选择图片上传取不到数据这个要怎么处理
- 升级新版本后 部分手机出现X5WebView初始化时空指针异常 HOT 6
- 在视频未播放之前,点击全屏按钮,已经切为横屏,但是没有播放视频
- Google商店 海外应用能支持X5吗 我看官方文档都是说不行 HOT 1
- 希望支持ppt和pdf的代码翻页
- 调起支付宝支付提示操作超时
- X5WebView是不是不支持访问res中的视频资源?
- Binary XML file line #8: Error inflating class com.ycbjie.webviewlib.view.X5WebView HOT 2
- 不维护了吗? HOT 3
- master项目下载下来,打包aar,在实际项目中使用报资源找不到java.lang.NoSuchFieldError: No static field abc_dialog_material_background_dark of type I in class
- 红米手机无法打开文件,报错是说不支持x5内核 HOT 1
- Android 6.0手机无法使用JsBridge
- com.ycbjie.webviewlib.view.X5WebViewActivity闪退
- H5页面调用全屏时,webview自动横屏显示了
- android 12 这个属性必填 android:exported HOT 1
- 播放视频退出全屏后页面黑屏了,但是有声音 HOT 1
- 播放视频退出全屏后,整个页面黑屏 HOT 2
- demo跑不起来了 HOT 4
- 请问还维护吗?
- 这个库不维护了吗 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ycwebview.