I read that WebView component in Android 4.4 is based on Chrome:
https://developers.google.com/chrome/mobile/docs/webview/overview#does_the_webview_support_the_chrome_apps_apis
However, support for Chrome Apps API is still not there. Does this mean that my WebView based app cannot use Chromecast Sender APIs ?
That is correct, you do not have the needed extension and APIs to use the (pure) chrome WebView to communicate with a chromecast device. As a side note, you cannot do that in the full Chrome on Android either.
I think Chromecast is one of those things that doesn't come with Chromium (the opensource project where Chrome is based upon) and Android uses Chromium for the webview, not Chrome :)
Related
What is the engine of Android native browser? Wiki says that Android used WebKit before 4.4 and Blink for 4.4 and further versions. Is it right statement? Thanks in advance.
The default browser on Android is Google Chrome. This uses the Blink layout engine. For AOSP installations without the Google Apps, the default browser is the old "Browser" app that uses Webkit.
other third party browsers like Firefox uses Gecko, Opera uses Blink, Dolphin uses Webkit, and there are probably others. Additionally, also Samsung and HTC install different (non-Chrome) browsers on their phones. I do not know what they are, or what engine they use.
similar question answered you can see here
I had a similar question. Below is what I found.
1. Wikipedia article
List of features in Android:
Web browser
The web browser available in Android is based on the open-source Blink (previously WebKit) layout engine, coupled with Chromium's V8 JavaScript engine. Then the WebKit-using Android Browser scored 100/100 on the Acid3 test on Android 4.0 ICS; the Blink-based browser currently has better standards support. The old web browser is variably known as 'Android Browser', 'AOSP browser', 'stock browser', 'native browser', and 'default browser' (from the time it was always the default). Starting with Android 4.4 KitKat, Google has begun licensing Google Chrome (a proprietary software) separately from Android, but usually bundled with (what most device vendors did). Since Android 5.0 Lollipop, the WebView browser that apps can use to display web content without leaving the app has been separated from the rest of the Android firmware in order to facilitate separate security updates by Google.
2. HTML5test's slides
The Android Browser
ANDROID 4 DEVICES
ALSO COMMONLY SHIP WITH
GOOGLE CHROME
DEPENDING ON YOUR DEVICE
GOOGLE CHROME COULD BE
AN EXTRA BROWSER
THE DEFAULT BROWSER
THE ONLY BROWSER
OR NOT THERE AT ALL
ANDROID 4.4 SHIPS
WITH A NEW WEBVIEW
BASED ON
CHROMIUM 30
BUT NOT THE SAME AS
GOOGLE CHROME
THE CHROMIUM BASED WEBVIEW
WILL BE UPDATED REGULARLY
ANDROID 4.4.3 → CHROMIUM 33
ANDROID 5 → CHROMIUM 37
IN FACT ON ANDROID 5
THE WEBVIEW CAN BE UPDATED
INDEPENTENTLY OF THE OS
3. Release Notes on WebView
Android 4.4 KitKat
Chromium WebView
Android 4.4 includes a completely new implementation of WebView that's based on Chromium. The new Chromium WebView gives you the latest in standards support, performance, and compatibility to build and display your web-based content.
Chromium WebView provides broad support for HTML5, CSS3, and JavaScript. It supports most of the HTML5 features available in Chrome for Android 30. It also brings an updated version of the JavaScript Engine (V8) that delivers dramatically improved JavaScript performance.
In addition, the new Chromium WebView supports remote debugging using Chrome DevTools. For example, you can use Chrome DevTools on your development machine to inspect, debug, and analyze your WebView content live on a mobile device.
The new Chromium WebView is included on all compatible devices running Android 4.4 and higher. You can take advantage of the new WebView right away, and with minimum modifications to existing apps and content. In most cases, your content will migrate to the new implementation seamlessly.
Android 5.0 Lollipop
Chromium WebView
The initial release for Android 5.0 includes a version of Chromium for WebView based on the Chromium M37 release, adding support for WebRTC, WebAudio, and WebGL.
Chromium M37 also includes native support for all of the Web Components specifications: Custom Elements, Shadow DOM, HTML Imports, and Templates. This means you can use Polymer and its material design elements in a WebView without needing polyfills.
Although WebView has been based on Chromium since Android 4.4, the Chromium layer is now updatable from Google Play.
As new versions of Chromium become available, users can update from Google Play to ensure they get the latest enhancements and bug fixes for WebView, providing the latest web APIs and bug fixes for apps using WebView on Android 5.0 and higher.
Android 7.0 Nougat
WebView
Chrome + WebView, Together
Starting with Chrome version 51 on Android 7.0 and above, the Chrome APK on your device is used to provide and render Android System WebViews. This approach improves memory usage on the device itself and also reduces the bandwidth required to keep WebView up to date (as the standalone WebView APK will no longer be updated as long as Chrome remains enabled).
You can choose your WebView provider by enabling Developer Options and selecting WebView implementation. You can use any compatible Chrome version (Dev, Beta or Stable) that is installed on your device or the standalone Webview APK to act as the WebView implementation.
Multiprocess
Starting with Chrome version 51 in Android 7.0, WebView will run web content in a separate sandboxed process when the developer option "Multiprocess WebView" is enabled.
...
I have written a webview app which opens a web url. However the experience is just like when I have opened it in the default web browser of my Samsung S3 phone (android ver 4.2) which is very poor (e.g. google map cannot be displayed). Is there a way to force the webview app to use other browsers that default one, for example using Chrome browser that i installed in my smartphone?
With Android 4.4, the WebView was switched to be based on the Chromium project. Prior to that it was an Android's specific implementation of WebKit. With Android 5.0 the WebView is now updatable without OS updates through the Google Play Store.
https://developer.chrome.com/multidevice/webview/overview
If you want consistent behavior in your WebView across multiple versions of Android you'll need to include your own browser engine. Once such project is Crosswalk.
What is a difference between intel xdk, appmobi, and crosswalk?
I am using Crosswalk to develop a HTML5 app. Now i have a problem with playback of embedded youtube videos within the website. I have the same issue testing the website in Chrome browser. There is no issue testing in Dolphin Browser or android default browser (< Android 4.3).
I had the problem in the past also with default android browser, but i can enable playback by setting user-agent to desktop browser. That doesn't work for the crosswalk browser.
If i run the app not on a smartphone but on a tablet it works, also in Chrome with default settings.
Does anybody has an idea/solution to enable video playback on smartphone?
Thank You!
Solved. Google's intention was, that every Android Smartphone would have installed the same basic codecs.
It seems that not every manufactor of cheap Android Smartphone (from China in this case) meets these requirements (even if Play Store is installed).
There is a way to display installed codecs on smartphone.
Apache Cordova apps use the default WebView control in Android.
Change default webkit on Apache Cordova - Android
So for Android 4.4, the WebView is using Chromium 30, and will never be updated (on 4.4).
http://www.mobilexweb.com/blog/android-4-4-kitkat-browser-chrome-webview
Does the "Chrome Apps on Mobile" version of Apache Cordova, package a Chrome Runtime with it to use for rendering? (please say yes)
https://github.com/MobileChromeApps/mobile-chrome-apps
The answer is no. The "Chrome Apps for Mobile" use the default WebView just like the normal Apache Cordova.
Do mobile chrome apps run in chrome?
The default system WebView’s are as follows:
OS: Mobile Safari WebKit based. Lots of web-platform overlap with Chrome, but not exact and diverging slowly.
Android 4.3 or older: Legacy Android WebView. Dated and occasionally buggy, but still fairly performant on certain tasks.
Android 4.4: Chrome based WebView. This initial release brought a slew of modern web apis, and enabled remote web
inspector. However, it also introduced some regressions, is stuck
at Chrome 30, and didn't bring all features, such as WebGL and
WebRTC.
Android Future: Since the first launch of Chrome based WebView, it was announced that work is ongoing to make the WebView
auto-update just like the Chrome Browser does.
Here's the good news quote from May 13th, 2014 from the same answer quoted above:
Excitingly, a significant portion of our recent work on
cordova-android has been on bundling a tip-of-tree chromium based
“webview” alongside your app, thanks to the Intel Crosswalk project (https://crosswalk-project.org/).
This would mean you ship your app to the Play Store together with your
very own modern build of Chromium webview. Best yet, it will work all
the way back to Android 4.0. Expect announcements on how to try it
yourself in the next month or so!
What audio formats can be played using the html5 'audio' tag in the android browser? Does anyone know where to find official specs on what the android browser supports and not?
For the record, the android media formats page does not seem to cover this - I have soundfiles (3gp) playing fine in a native app, but they won't play in my webapp.
The webkit docs also do not seem to help. My soundfiles play fine in my webapp on iphone, so that version of webkit handles them fine. Shouldn't the android browser have some official documentation somewhere?
Probably there should be official documentation. If you want to test it, why not make a web page on some domain you have access to, with links to all of the different sound files you can think of, and point your browser at it.
After some testing, I've concluded that support for the HTML5 audio element is broken in Android 2.1. Details of my testing can be found on my blog. I tested on an HTC Desire running Android 2.1 and HTC Sense, whereas Amos confirmed the same error on his HTC Heor running a custom 2.1 ROM (thanks, Amos!). If anyone will try the testpage in different configurations and report back either here or on my blog, I will update with any new information.