机器人的WebView VS手机浏览器机器人、浏览器、手机、VS

2023-09-12 21:59:19 作者:Galaxy(距离)

我已经经历了奇怪的行为很多,使用的WebView 安卓,我不知道为什么会出现是的WebView 浏览器安装在每台手机上?

I've experienced a LOT of strange behaviours with using WebView in Android and I'm wondering why there are so many diffrences between the WebView and the Browserinstalled on each phone?

作为一个例子,我已经开发了一些应用程序,必须显示 HTML 的内容,其中既包含的jQuery移动闪存的JavaScript ,YouTube的嵌入等。所以,我有很多的问题,显示在 WebViews 这个页面。要么他们就无法显示在所有的,只是空白,无论是视频无法播放等。而奇怪的是,他们正常工作,如果在浏览器安装在手机上打开。我已经启动了JavaScript,我想指出错误WebSettings,我所设定的WebChromeClient和WebViewClient寻找JavaScript错误......但毫无效果。

As an example, I've developed some applications that had to display HTML content, which contained either jquery-mobile, flash,javascript, YouTube embedded and so on. So I had a lot of problems with displaying this pages inside WebViews. Either they wouldn't get displayed at all, just blank, either the videos won't play and so on. And the strange thing is that they work properly if opened in the Browser installed on the phone. I had JavaScript enabled, I tried diffrent WebSettings, I had set the WebChromeClient and WebViewClient looking for javascript errors... but nothing worked.

所以我就来了的WebView 成分是从浏览器安装在手机上应用程序完全不同的结论。我想,每一个制造商使自己的浏览器来支持尽可能多的网页,而的WebView 仍是标准之一,纳入 Android SDK中

So I got to the conclusion that the WebView component is completely different from the Browser application installed on the phones. I'm thinking that every manufacturer makes their own Browser to support as many as possible pages, and the WebView remains the standard one, included in the Android SDK.

我说得对不对?或者有其他原因/解释呢? 谢谢你。

Am I right? Or there is another reasons/explanation for this? Thanks.

编辑:的一切,@ondoteam曾建议启用并设定在时间之中。我不再有引用该网站,这无论如何都是内部的。

Everything that @ondoteam has suggested was enabled and set at the time being. I no longer have the references to that websites, which anyway were internal.

推荐答案

本文概述了你的猜测制造商之间的股票浏览器的差异,这绝对是正确的:5现实检查每一个团队工作在Android的WebKit

This article outlines your speculation about stock browser differences between manufacturers, that absolutely is true: 5 reality checks every team needs before working on Android webkit

...这也造成麻烦和神秘/难以诊断/解决问题。

...which does cause trouble and mysterious/difficult to diagnose/solve problems.

至于你的问题,你的的WebView 实施

As far as your issues with your WebView implementation:

的jQuery移动可能是一个问题jquery-mobile如果您使用的是 jquery.mobile-1.0.1.min.js 你可能想尝试uncom pressed jquery.mobile-1.0.1.js

Version of jquery-mobile may be an issue jquery-mobile loaded into an android WebView if you are using jquery.mobile-1.0.1.min.js you may want to try the uncompressed jquery.mobile-1.0.1.js

和闪光灯: - /祝你好运: Screen闪烁使用带闪光灯一个web视图时

And Flash :-/ Good luck: Screen blinking when using a webview with flash

闪光灯不工作在Android 3.2

Flash视频不适合安卓3.0.1 显示在web视图

有关加载SWF:

加载的SWF到的WebView

加载Flash文件(.swf文件)的WebView Android中

祝你好运,似乎是一个很大的变数与设备,Android的版本等,并会采取持续性的试验/错误。

Good luck with that, seems like a lot of variables with devices, Android versions, etc. And will take persistence with trial/error.

 
精彩推荐
图片推荐