某些机器人上的 WebView 中未加载特定链接
我有一个应用程序,当用户按下电子邮件时,它会在网络视图中显示此链接:
https: //marauder.millersville.edu/mail/index.pl
我在 Droid X 上开发了该应用程序,在我的手机上,链接加载正常,但我收到了来自拥有 Incredible & 的用户的报告。 Droid X 链接加载空白屏幕。
我自己在朋友 Incredible 上测试过它,它确实只加载了一个白屏,但我已经在其他各种 Android 设备上测试过它,它的加载效果很好。
所有其他链接也可以在 Incredible 上正常加载。我假设它与 SSL 有关,是 https。我在 iPhone 上使用此链接时遇到问题,但能够修复它。让我困惑的是为什么它在某些设备上运行良好,而在其他设备上却运行不佳。
任何人有任何想法或建议吗?谢谢!
以下是我设置网络视图的方法:
// setup webview
web = (WebView) findViewById(R.id.webview);
web.setWebChromeClient(new InternalWebViewClient());
web.getSettings().setJavaScriptEnabled(true);
web.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
web.getSettings().setPluginsEnabled(true);
web.getSettings().setSupportMultipleWindows(true);
web.getSettings().setSupportZoom(true);
web.getSettings().setAppCacheEnabled(true);
web.getSettings().setSaveFormData(true);
web.getSettings().setSavePassword(true);
web.getSettings().setBuiltInZoomControls(true);
web.setHorizontalScrollBarEnabled(true);
web.setVerticalScrollBarEnabled(false);
I have an app out which displays this link in a web view when a user presses e-mail:
https://marauder.millersville.edu/mail/index.pl
I developed the app on an Droid X, and on my phone the link loads fine, but I have had reports from users who have an Incredible & Droid X that the link loads a blank screen.
I have tested it myself on a friends Incredible, and it indeed only loads a white screen, but I have have tested it on various other android devices and its loads fine.
And every other links also loads fine on the Incredible. I am assuming it has something to do with the SSL, being a https. I had troubles with this link on an iPhone but was able to fix it. What puzzles me is why it works fine on some devices and not on others..
Anyone have any ideas or suggestions? Thanks!
Here is how I am setting up my web view:
// setup webview
web = (WebView) findViewById(R.id.webview);
web.setWebChromeClient(new InternalWebViewClient());
web.getSettings().setJavaScriptEnabled(true);
web.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
web.getSettings().setPluginsEnabled(true);
web.getSettings().setSupportMultipleWindows(true);
web.getSettings().setSupportZoom(true);
web.getSettings().setAppCacheEnabled(true);
web.getSettings().setSaveFormData(true);
web.getSettings().setSavePassword(true);
web.getSettings().setBuiltInZoomControls(true);
web.setHorizontalScrollBarEnabled(true);
web.setVerticalScrollBarEnabled(false);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您尝试加载的站点使用自签名证书。解决方案是忽略证书检查,如下所述:Web View on Android 支持 SSL 吗?
The site you are trying to load uses self signed certificates. The solution is to ignore certificate checking as described here: Does the Web View on Android support SSL?