Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a better webview for Android

Is there a better webview for android? Google's own documents mention not to rely on the webview object.

But for using webkit it seems strange that it is so limited, compared to other webkit browsers used on mobile devices with comparable hardware.

This is evident in jquery mobile implementations, or similarly sencha touch implementations for web apps. The Android version suffers slowdowns, rendering issues, and a poor user experience, where other mobile devices - like an iphone - will run it fine. they both use webkit. and outside of an app, the actual android browser runs just fine.

Is there a way to really address android's problem, on a lower level? Has anyone made a more comprehensive web object for Android?

Thanks for any insight

like image 675
CQM Avatar asked Jun 08 '12 20:06

CQM


People also ask

What is alternative of WebView in Android?

Alternatives to WebView If you want to send users to a mobile site, build a progressive web app (PWA). If you want to display third-party web content, send an intent to installed web browsers. If you want to avoid leaving your app to open the browser, or if you want to customize the browser's UI, use Custom Tabs.

Do I really need Android System WebView?

Do I need Android System WebView? The short answer to this question is yes, you do need Android System WebView. There is one exception to this, however. If you're running Android 7.0 Nougat, Android 8.0 Oreo, or Android 9.0 Pie, you can safely disable the app on your phone without suffering adverse consequences.

Can I update Android WebView?

You can search for Android System WebView on Playstore and update it to the latest version. Search for a Default Browser and make sure to update it to the latest version. In most cases, Chrome is the default Browser.

What is the difference between Chrome for Android and WebView?

The WebView shipped with Android 4.4 (KitKat) is based on the same code as Chrome for Android version 30. This WebView does not have full feature parity with Chrome for Android and is given the version number 30.0.0.0. The updated WebView shipped with Android 4.4.3 has the version number 33.0.0.0.

What is custom WebView in Android?

Custom WebView is based on the Google Chrome feature released with Android 7. Later on, it became the default choice for every Android smartphone. It can be changed in Android 10 and above, where WebView is an independent component, sharing code with Chrome. Do you need an Android System WebView?

Does the WebView auto-update?

The WebView will auto-update for mobile devices with Android L and above. For future proofing you app, you can use the Beta WebView to test versions of the WebView before it's launched. Checkout this Android Developer blog post for more details.

What is the best alternative to WebView?

I had a similar need to get an alternative to WebView. Found GeckoView based on GeckoEngine by Mozilla. GeckoView is designed to expose the entire power of the Web to applications, and all that through a straightforward API. Better Performance over WebView. Far Better with performance for Graphis Intensive WebApps.


1 Answers

CQM,

Understand that I agree with Commonswares and nearly everything that stated in the supplied answer. However, the question seems to imply that there is an issue that you are having (either in comprehension or conception) and want to find/develop a more adequate solution for your needs.

Addressing the question and the responses you are probably going to receive:

I believe Commonswares valid criticism is due to the fact that you do not state why or how the provided platform object is unsatisfactory, nor do you state why or when you believe that Google has said that said object is unreliable. If you would like better feedback, edit your question appropriately to communicate this and you'll have fewer problems here.

Further, as explained further below, you imply that this is a problem with the Android platform (in fact, almost directly state it) and it is not. There are too many considerations in the broad scope of web browsing to be completely addressed by a simple control such as the WebView. Microsoft faced the same issue with their embedded IE COM Object back in the 90s. Its a big issue that doesn't belong to any one group.

Addressing the implied question:

The WebView object is basically a mini-browser utilizing highly flexible rendering code based on entirely different parameters from that of a dedicated browser. This includes everything from simple rendering, to even interactible (sp?) objects such as the links that such a page would employ. This process is very difficult to (for lack of a better word) to miniaturize in such a way that capability is uniform for embedding into a variety of apps that have may a different layout structure and parameters every time. Heck, such engines are hard to program uniformly even with a dedicated browsing engine, leading to a lot of the differences between the current major browsers as a whole.

As such, the WebView is not meant to provide the full functionality of a dedicated browser, but the most useful aspects of displaying web delivered content within an application that often does other things. This is especially true when you consider the security implications of adding Javascript functionality or client-based processing delivered from said content. Add to that, each device has the potential to have a different rendering engine or different version of the same rendering engine, much the same way that different devices have different capabilities utilizing SQLite (i.e. Foreign Key support).

As such, the WebView is provided as a solution to display web delivered content without guarantee as to its extensibility or usability unless you use it purely to view (and possibly react) trusted and standards conformant HTML code. Once you get into the actual practices of real world websites, you realize that HTML was made so flexibly specifically because each standard as adhered to at different levels by different developers. Since the primary credo of HTML is that it work (show content), despite potential ambiguities, the issue of developing a fully comprehensive app-embedded object oriented solution becomes even harder to develop.

... where other mobile devices - like an iphone - will run it fine

This depends on the content. Also the development philosophy for the Apple devices is entirely different from that of Android. Apple has only a handful of devices, so they can guarantee uniformity across their devices and choose which and when to add additional features. For instance, the first iPhone didn't have native support for Flash. Based on the implications of your question, I believe this fails the "comprehensive" test.

Android, in contrast, has a much wider repertoire of devices. The code for Android is adjusted and altered by the manufacturers of these devices to allow them to make more adequate supportable solutions for their specific device needs. Google cannot guarantee that any given device will keep any or all of its code the same in any way. This creates further limitations but creates other very awesome freedoms.

... they both use webkit.

Chrome and Safari both use webkit, as well. Many developers have been plagued by the even minute differences in the way that they both utilize it differently.

... outside of an app, the actual android browser runs just fine.

This is addressed above.

Is there a way to really address android's problem, on a lower level?

Again, this is not android's problem. If you are having a specific issue with the current implementation, you are free to code a separate solution. Further, web content was made to be viewed in a browser and that is provided. The best practice is to define what you need it to do specifically. Do you need the WebView to view any web page? Or just yours? What are your issues with its current rendering? Do you require client-side scripting?

Every tool is made with particular needs in mind. This is even true of the so-called "better" listviews. Those views were made to address specific needs that might be needed by more than one developer. In the world of programming (especially OOP), there is really very little such thing as comprehensive. If there was, we wouldn't have to extend our objects in the first place. When looking at such a tool, consider what need it was specifically trying to address.

Has anyone made a more comprehensive web object for Android?

Yes. They are normally manifested in the other dedicated browsers that you can download to your device. As to whether or not they are accessible: personally, I have no idea and am not inclined to look.

Final Statement

The issue you have raised was really not specific enough to provide a true solution. It also seemed to take an antagonistic stance, due to poor word choice. If your issue was not resolved by either CommonsWare's answer or my own, consider editing your question to add our more specific needs. That said, I hope both of our answers were able to provide some insight for you.

Hope this helps,

FuzzicalLogic

like image 135
Fuzzical Logic Avatar answered Sep 21 '22 14:09

Fuzzical Logic