1## 3.4\. Web Compatibility 2 3### 3.4.1\. WebView Compatibility 4 5If device implementations provide a complete implementation of the 6`android.webkit.Webview` API, they: 7 8* [C-1-1] MUST report `android.software.webview`. 9* [C-1-2] MUST use the [Chromium](http://www.chromium.org/) Project build 10 from the upstream Android Open Source Project on the Android 11 ANDROID_VERSION branch for the implementation of the 12 [`android.webkit.WebView`]( 13 http://developer.android.com/reference/android/webkit/WebView.html) 14 API. 15* [C-1-3] The user agent string reported by the WebView MUST be in this format: 16 17 Mozilla/5.0 (Linux; Android $(VERSION); \[$(MODEL)\] \[Build/$(BUILD)\]; wv) 18 AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 $(CHROMIUM_VER) Mobile 19 Safari/537.36 20 21 * The value of the $(VERSION) string MUST be the same as the value for 22 android.os.Build.VERSION.RELEASE. 23 * The $(MODEL) string MAY be empty, but if it is not empty it MUST have 24 the same value as android.os.Build.MODEL. 25 * "Build/$(BUILD)" MAY be omitted, but if it is present the $(BUILD) 26 string MUST be the same as the value for android.os.Build.ID. 27 * The value of the $(CHROMIUM_VER) string MUST be the version of Chromium 28 in the upstream Android Open Source Project. 29 * Device implementations MAY omit Mobile in the user agent string. 30 31* The WebView component SHOULD include support for as many HTML5 features as 32 possible and if it supports the feature SHOULD conform to the 33 [HTML5 specification](http://html.spec.whatwg.org/multipage/). 34 35* [C-1-3] MUST render the provided content or remote URL content in a process 36 that is distinct from the application that instantiates the WebView. Specifically 37 the separate renderer process MUST hold lower privilege, run 38 as a separate user ID, have no access to the app's data directory, 39 have no direct network access, and only have access to the minimum-required 40 system services over Binder. The AOSP implementation of WebView meets 41 this requirement. 42 43Note that if device implementations are 32-bit or declare the feature flag 44`android.hardware.ram.low`, they are exempted from C-1-3. 45 46 47### 3.4.2\. Browser Compatibility 48 49If device implementations include a standalone Browser application for general 50web browsing, they: 51 52* [C-1-1] MUST support each of these APIs associated with 53 HTML5: 54 * [application cache/offline operation]( 55 http://www.w3.org/html/wg/drafts/html/master/browsers.html#offline) 56 * [<video> tag]( 57 http://www.w3.org/html/wg/drafts/html/master/semantics.html#video) 58 * [geolocation](http://www.w3.org/TR/geolocation-API/) 59* [C-1-2] MUST support the HTML5/W3C [webstorage API]( 60 http://www.w3.org/TR/webstorage/) and SHOULD support the HTML5/W3C 61 [IndexedDB API](http://www.w3.org/TR/IndexedDB/). Note that as the web 62 development standards bodies are transitioning to favor IndexedDB over 63 webstorage, IndexedDB is expected to become a required component in a 64 future version of Android. 65* MAY ship a custom user agent string in the standalone Browser application. 66* SHOULD implement support for as much of [HTML5]( 67 http://html.spec.whatwg.org/multipage/) as possible on the standalone 68 Browser application (whether based on the upstream WebKit Browser 69 application or a third-party replacement). 70 71However, If device implementations do not include a standalone Browser 72application, they: 73 74* [C-2-1] MUST still support the public intent patterns as described in 75 [section 3.2.3.1](#3_2_3_1_core_application_intents). 76