concept WebKit in category android

This is an excerpt from Manning's book Android in Action, Third Edition.
Android’s challenge is to scale down to this market. Some of the bells and whistles in Android can be left out to fit into lower-end hardware. One of the big functionality gaps on these lower-end phones is the web experience the user gets. Part of the problem is screen size, but equally challenging is the browser technology itself, which often struggles to match the rich web experience of desktop computers. Android features the market-leading WebKit browser engine, which brings desktop-compatible browsing to the mobile arena. Figure 1.2 shows WebKit in action on Android. If a rich web experience can be effectively scaled down to feature phone class hardware, it would go a long way toward penetrating this end of the market. Chapter 16 takes a close look at using web development skills for creating Android applications.
WebKit The WebKit (www.webkit.org) browser engine is an open source project that powers the browser found in Macs (Safari) and is the engine behind Mobile Safari, which is the browser on the iPhone. It’s not a stretch to say that the browser experience is one of a few features that made the iPhone popular out of the gate, so its inclusion in Android is a strong plus for Android’s architecture.
This chapter aims to equip you with an understanding of various approaches to deploying web technologies so that you can deliver an enhanced Android user experience. We start by surveying the major options for Android web technology development, all of which rely on the WebKit open source browser engine. After a brief introduction to WebKit, we look at creating universal web applications—apps that run well on the desktop as well as the Android browser. From there we move on to demonstrating the use of the SQL capabilities available in the browser, commonly referred to as HTML 5 databases. Note that although the browser SQL functionality was originally part of HTML 5, it has since been extracted from the core HTML 5 specification.
The WebKit browser engine stems from an open source project that can be traced back to the K Desktop Environment (KDE). WebKit made its significant mobile debut when the iPhone was released, and since then WebKit has been adopted by Android and other mobile platforms.
Prior to the adoption of WebKit, early mobile web solutions ranged from laughable, to mediocre, to tolerable, though always limited. These early mobile web offerings were often so constrained that they required content providers to generate a mobile-specific stream in addition to the normal desktop version of their material. In some cases, a server-side component would perform on-the-fly distillation of the HTML into a format more readily digested by the mobile browser. Regardless of the implementation, any requirement for content providers to generate multiple copies of their material severely constrained the volume of content the early mobile devices could readily consume. The early mobile web was virtually nonexistent because browsers were not capable of rendering full pages and sites made for mobile were rare.
Fortunately, WebKit has changed the game thanks to its impressive rendering capabilities and its envelope-pushing feature set. You can expect the WebKit engine to render any web page on a par with your desktop browser. This means that virtually the entire web is open and accessible to an Android user! The pages of your favorite website will render on your Android device’s browser, though you’ll likely need to scroll the page due to the small screen dimensions, and certain navigation systems that rely on hovering aren’t accessible. Despite these drawbacks, the capabilities of WebKit open the broad range of the web to mobile users. In this chapter, we demonstrate how to scale your web applications to accommodate for smaller browser windows in a manner that retains desktop browsing compatibility, all without the necessity of creating and managing multiple sites.
WebKit powers the browser on the Android device, but it’s also available as an embedded control or widget, permitting SDK-based applications to render HTML directly within a compiled application. This embeddable browser control is highly customizable and thereby empowers the Android developer to exercise a tremendous amount of control over the user experience.