Android 5.0 ‘Lollipop’ has certainly positioned itself to be one of the more significant updates Google has released, so far, to its mobile platform. With a brand new look via Google’s Material Design and over 5000 new APIs, it’s sure exciting!
Sencha is firmly committed to HTML5 and the Web, so we always keep a close eye on how new releases impact both developers and end users who rely on web technology. Because Android holds a dominant 51.5% share of mobile devices in the US (and almost 85% globally), we decided to dig into the new release and pull out the Web-specific details we felt were most important.
The Web on Android 5.0
Android 5.0 ships with Chrome for Android 38 as its default browser. This is not a big change for most Android users as they have been able to access this browser from the Google Play Store for a while now. We also know that Chrome for Android 39 is already rolling out to people and expect that most of ‘Lollipop’ device owners will be updated soon enough. The more interesting story for web developers lies in the new Android WebView.
Improvements to the WebView
The new Android 5.0 WebView is now based on Chromium 37 — but probably the biggest change we see on Android 5.0 is the fact that the core WebView is no longer coupled to the Android OS. Google is now able to push updates, changes and fixes to the WebView via the Google Play Store — allowing hybrid applications to benefit from more frequent updates than the whole Android OS release cycle. You can dig into all the info on this change by reading the Chromium WebView sections of the Google developer docs.
Now, with this great power comes potential disaster. As users have the final say on which things from the app store actually make it to their devices, this awesome feature could easily result in some serious fragmentation. For example, one user might be running a Chromium 37 powered WebView while others have already updated to 38 or 39.
If you are truly looking for a solution that cleans up such fragmentation on any mobile environment, check out Sencha Space.
You can also view our webinar recording:
Sencha Space — The Secure Way to Deploy and Manage Desktop and Mobile Apps
The New Goodies
We already pointed out how the WebView on Android 5.0 will run Chromium 37 — yet the default browser is Chrome for Android 38. This will cause some headaches for a while, as we can see in the difference between the middle and right columns of this chart. There’s a significant amount of green in the right column that is missing from the middle column.
The 5.0 WebView will be missing features like FileSystem, FileWriter, Battery Status, Full Screen and Web Speech. Interestingly enough, the Web Speech API seems to exist in Chromium 37, but there are simply no voices to actually do the speaking. And from what we can tell, the Web Audio API does seem to be working in Browser 37 even though it has not been verified on caniuse.com yet.
Needless to say, we hope Google will push out an update to the WebView soon with all of the Chromium 38 improvements.
In the meantime, lets take a look at some of the key features the WebView gained in Android 5.0 over 4.4.4:
Web Animations API
This is another huge feature for the evolution of the Web Platform. The browser is now aware of the fact that users want to animate elements and will handle this natively. For example, instead of needing to manually track CSS values and modify them, you can simply use the element.animate() call and pass in animation properties. This will return a AnimationPlayer, which is useful for adding listeners or controlling your animation.
This API will open up access to external device data such as webcam video allowing for a whole different caliber of applications to be created.
We will finally have built-in support for peer-to-peer communication directly via the browser. This could be huge for enterprise communication applications or mobile gaming.
SVG Fragment IDs
As we mentioned in our previous iOS 8 blog post, this is a sneaky but powerful feature that opens up the ability for vector-based spritesheets. This is now available across the board on the latest browsers and is a great step forward.
WebGL 3D Canvas Graphics
Of course, the biggest monster feature we are all excited about is full hardware-accelerated 3D graphics support. Game developers will certainly be thrilled to see adoption of this feature across IE, Safari, iOS, Android and Chrome — but we have no doubt that app developers will be looking to tap into the power here as well.
Cordova and PhoneGap users will be extremely excited to see this boost for their applications, and as we look forward, we can see the ever expanding potential for the web as a mobile application platform. Sencha Space goes one step further and now provides an Android client app with a single WebView based on Chromium 38 for all Android 4.x devices. This improvement brings hardware accelerated graphics to the vast majority of the current Android install base.
HTML5 developers are always excited to see new features supported by modern browsers because they enable web applications to deliver rich experiences on any device. But beyond the capabilities of HTML5, developers also need their applications to be fast. How do web applications stack up on Android 5.0?
Unlike the recent iOS 8 update, Android 5.0 doesn’t ship with any across-the-board gains in HTML5 performance. On the one hand, the Android stock browser has been based on Chromium for a while and iterations on this have not “accelerated” a lot of major speed bursts.
We can however see how things are moving forward in the space as we break them down, particularly with the WebView. As one would expect, running Chrome 38 on 4.4.4 or 5.0 had no noticeable advantages in any of our tests. Note: all of these tests were done on our Nexus 7 (2013) running the Android 5.0 GA.
Here, we’re looking at Google’s own Octane v2 scores. We can see the Android 5.0 WebView has some remarkable improvements. For example, the Splay test is seeing a 324% improvement, Deltablue increased 87% and Box2DWeb gained 68%.
Seeing that Chromium 37 will be the baseline for all devices coming out with Android 5.0, performance certainly does appear to be moving in the right direction with this update.
Dromaeo Dom Core Tests
In the Dromeao Dom Core Tests, we can see the 5.0 WebView saw improvements in all areas except Dom Attributes — where it actually saw almost a 20% drop in performance. Dom Query, however, is a clear winner and a big boost in performance for Chromium 37. The charts make it hard to see, but the Android 5.0 WebView actually has an 18% increase over Android 4.4.4.
Dromaeo CSS Selector Tests
In the Dromeao CSS Selector Tests, you can see a lot of orange and blue in the lead here, which means CSS selector tests are a loss for us moving forward into Android 5.0. It’s fair to say that overall CSS Selector performance will not be as speedy.
Here, we see another loss in performance as we move to Android 5.0 — we saw a drop in almost all of these tests. The most dramatic being a 16.8% loss of performance for Code Eval in the Android 5.0 WebView compared to Android 4.4.4. Though none of these are extremely major hits, we would always like to see the charts moving the other way.
IE Fishtank Test
We see another major loss here for Android 5.0, looking at 2D canvas drawing. In the more realistic tests of 100 Fish, we see about a 40% drop in performance for the Android 5.0 WebView. These kinds of FPS will not be welcomed by a lot of the web-based game developers out there.
SunSpider tests are also not exciting to look at as the current leader across the board is the 4.4.4 WebView. String, Crypto and Date tests all saw about a 15% decrease in performance between the WebViews. We can see that the WebView performance did come out better than the Chrome 38 Browser for now.
Last but not least, here is a simple look at the overall HTML5 ratings.
Hybrid applications running in the WebView gain a ton of features in Android 5.0 (score of 493) compared to Android 4.4 with a score of 434. Developers should be really excited to see the improved performance and new features in the WebView.
The release of Android 5.0 brings a mixed bag of reviews for HTML5 developers.
Although we are disappointed with the performance comparison this time around, it is worth noting that nothing really felt ‘slow’ or ‘sluggish’ on our devices. As we look forward to the new Nexus 6 and Nexus 9 (with their improved hardware), we can expect that performance will not be a key factor anymore.
Along with a huge gain in WebView features, we also are seeing a really nice developer workflow for Android. The independent updates should make innovating with the Web on Android devices a much better experience for everyone.
Anytime we see this many new features and this much support for HTML5, we can’t help but have a positive outlook on the future of the Web. We hope you found this information useful. Please feel free to drop us a line below in the comments.
To learn more, view our webinar recording:
Sencha Space — The Secure Way to Deploy and Manage Desktop and Mobile Apps