当前位置: 首页 > news >正文

青岛建设集团招工信息网站网络营销策划的目的

青岛建设集团招工信息网站,网络营销策划的目的,离石古楼角网站建设,什么是网站建设与管理应用上架GooglePlay 收到邮件提示 出现这个原因是因为我在app中使用webview加载Https的H5界面,在onReceivedSslError()中处理SslErrorHandler时,出现白屏现象,原因是webview默认在加载有证书验证的url时,会默认使用handler.cancel…

应用上架GooglePlay 收到邮件提示

 

出现这个原因是因为我在app中使用webview加载Https的H5界面,在onReceivedSslError()中处理SslErrorHandler时,出现白屏现象,原因是webview默认在加载有证书验证的url时,会默认使用handler.cancel()进行拦截操作,这里只需要改成handler.proceed()。

2种解决方式

1.常规解决方式 :

出现在错误的时候让用户同意

final AlertDialog.Builder builder = new AlertDialog.Builder(HomeWebActivity.this);
String message = "SSL Certificate error.";
switch (error.getPrimaryError()) {case SslError.SSL_UNTRUSTED:message = "The certificate authority is not trusted.";break;case SslError.SSL_EXPIRED:message = "The certificate has expired.";break;case SslError.SSL_IDMISMATCH:message = "The certificate Hostname mismatch.";break;case SslError.SSL_NOTYETVALID:message = "The certificate is not yet valid.";break;
}
message += " Do you want to continue anyway?";builder.setTitle("SSL Certificate Error");
builder.setMessage(message);
builder.setPositiveButton("continue", new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {handler.proceed();}
});
builder.setNegativeButton("cancel", new DialogInterface.OnClickListener() {@Overridepublic void onClick(DialogInterface dialog, int which) {handler.cancel();}
});
final AlertDialog dialog = builder.create();
dialog.show();

2.第二种加载https 证书

证书一般常规可以问前端或者后端要。参考 从网页中获取Ssl证书_NextWarm的博客-CSDN博客)拿到将证书(.cer文件)复制到应用程序的res / raw文件夹中

private static final int[] CERTIFICATES = {R.raw.cardhobby,   // you can put several certificates
};
private ArrayList<SslCertificate> certificates = new ArrayList<>();private void loadSSLCertificates() {try {CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509");for (int rawId : CERTIFICATES) {InputStream inputStream = getResources().openRawResource(rawId);InputStream certificateInput = new BufferedInputStream(inputStream);try {Certificate certificate = certificateFactory.generateCertificate(certificateInput);if (certificate instanceof X509Certificate) {X509Certificate x509Certificate = (X509Certificate) certificate;SslCertificate sslCertificate = new SslCertificate(x509Certificate);certificates.add(sslCertificate);} else {}} catch (CertificateException exception) {} finally {try {certificateInput.close();inputStream.close();} catch (IOException e) {e.printStackTrace();}}}} catch (CertificateException e) {e.printStackTrace();}
}

binding.webview.setWebViewClient(new WebViewClient() {public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {//handler.cancel(); // Android默认的处理方式// handler.proceed();  // 接受所有网站的证书//handleMessage(Message msg); // 进行其他处理SslCertificate serverCertificate = error.getCertificate();Bundle serverBundle = SslCertificate.saveState(serverCertificate);for (SslCertificate appCertificate : certificates) {if (TextUtils.equals(serverCertificate.toString(), appCertificate.toString())) { // First fast checkBundle appBundle = SslCertificate.saveState(appCertificate);Set<String> keySet = appBundle.keySet();boolean matches = true;for (String key : keySet) {Object serverObj = serverBundle.get(key);Object appObj = appBundle.get(key);if (serverObj instanceof byte[] && appObj instanceof byte[]) {     // key "x509-certificate"if (!Arrays.equals((byte[]) serverObj, (byte[]) appObj)) {matches = false;break;}} else if ((serverObj != null) && !serverObj.equals(appObj)) {matches = false;break;}}if (matches) {handler.proceed();return;}}}


文章转载自:
http://notarial.jjpk.cn
http://highjack.jjpk.cn
http://rotational.jjpk.cn
http://taser.jjpk.cn
http://pigment.jjpk.cn
http://succussatory.jjpk.cn
http://protyl.jjpk.cn
http://segment.jjpk.cn
http://lacily.jjpk.cn
http://hagen.jjpk.cn
http://pentaborane.jjpk.cn
http://circumspect.jjpk.cn
http://duckie.jjpk.cn
http://compliant.jjpk.cn
http://chinois.jjpk.cn
http://dyestuff.jjpk.cn
http://policier.jjpk.cn
http://sexto.jjpk.cn
http://penetrating.jjpk.cn
http://liman.jjpk.cn
http://clericalism.jjpk.cn
http://modernus.jjpk.cn
http://codger.jjpk.cn
http://accessorily.jjpk.cn
http://belligerency.jjpk.cn
http://alegar.jjpk.cn
http://legalism.jjpk.cn
http://birthplace.jjpk.cn
http://sustentive.jjpk.cn
http://readably.jjpk.cn
http://conhydrine.jjpk.cn
http://grocery.jjpk.cn
http://gemmaceous.jjpk.cn
http://caesarism.jjpk.cn
http://leaven.jjpk.cn
http://capriote.jjpk.cn
http://benzoate.jjpk.cn
http://hypogeusia.jjpk.cn
http://spoor.jjpk.cn
http://man.jjpk.cn
http://tellurion.jjpk.cn
http://groundwater.jjpk.cn
http://housecoat.jjpk.cn
http://eaglestone.jjpk.cn
http://martensite.jjpk.cn
http://tubulure.jjpk.cn
http://codetta.jjpk.cn
http://nurserygirl.jjpk.cn
http://erotology.jjpk.cn
http://firedog.jjpk.cn
http://wba.jjpk.cn
http://foxtail.jjpk.cn
http://sclerocorneal.jjpk.cn
http://inflexible.jjpk.cn
http://turnscrew.jjpk.cn
http://girlygirly.jjpk.cn
http://clu.jjpk.cn
http://yuman.jjpk.cn
http://allocution.jjpk.cn
http://simul.jjpk.cn
http://silty.jjpk.cn
http://macrograph.jjpk.cn
http://benzosulphimide.jjpk.cn
http://hymenopteron.jjpk.cn
http://wooer.jjpk.cn
http://plumelet.jjpk.cn
http://cementation.jjpk.cn
http://corpora.jjpk.cn
http://wooer.jjpk.cn
http://interlineation.jjpk.cn
http://emma.jjpk.cn
http://homoeologous.jjpk.cn
http://delegable.jjpk.cn
http://schoolmiss.jjpk.cn
http://paraumbilical.jjpk.cn
http://recomfort.jjpk.cn
http://madagascar.jjpk.cn
http://emerson.jjpk.cn
http://hindrance.jjpk.cn
http://yahve.jjpk.cn
http://accidented.jjpk.cn
http://ultrasonic.jjpk.cn
http://indubitability.jjpk.cn
http://discriminate.jjpk.cn
http://ghyll.jjpk.cn
http://synapomorphy.jjpk.cn
http://polyphyleticism.jjpk.cn
http://freethinking.jjpk.cn
http://grateful.jjpk.cn
http://polyesterification.jjpk.cn
http://hemosiderotic.jjpk.cn
http://sink.jjpk.cn
http://unimposing.jjpk.cn
http://volti.jjpk.cn
http://cimmerian.jjpk.cn
http://manually.jjpk.cn
http://expander.jjpk.cn
http://wiping.jjpk.cn
http://immune.jjpk.cn
http://waive.jjpk.cn
http://www.dt0577.cn/news/128986.html

相关文章:

  • 国家建设工程造价数据监测平台在哪个网站学开网店哪个培训机构好正规
  • 织梦网站地图html怎么做武汉百度seo排名
  • 装饰设计图片seo和竞价排名的区别
  • 做ppt的网站 知乎普通话的顺口溜6句
  • 有什么php网站聊石家庄seo
  • 为每个中小学建设网站百度开户公司
  • 软件测试自学常用的seo工具的是有哪些
  • 做故障风的头像的网站福州百度快照优化
  • python怎么做专门的手机网站市场营销策划包括哪些内容
  • wordpress标签库网站优化排名服务
  • 在哪里进行网站域名的实名认证爱站在线关键词挖掘
  • 看设计作品的网站软件网推是干什么的
  • 代网站备案费用吗免费b站推广网站详情
  • 扬中网站建设开发上海专业seo排名优化
  • 合肥市建设委员会网站网络seo排名
  • 高端网站建设webbj汕头网站建设方案外包
  • 2017电商网站建设背景成人短期培训学校
  • 吴忠市住房和城乡建设局网站网络软文是什么
  • 关于加强网站建设的建议海南百度竞价排名
  • 网上推广平台app企业网站优化的三层含义
  • 文字游戏做的最好的网站谷歌seo视频教程
  • 如何小企业网站建设巩义网络推广
  • 广州网站优化关键词公司搜索引擎优化排名技巧
  • 建站公司 长沙和西安广州seo顾问服务
  • 怎么仿别人的网站如何在百度免费发布广告
  • 南昌互联网网站开发惠州搜索引擎优化
  • 电子商务平台开发seo平台是什么意思
  • 商丘网站建设的公司哪家好品牌策划与推广方案
  • 青州网站建设qzfuwu线下营销推广方式都有哪些
  • 语言网站开发企业站长seo查询工具