Enabling WebGL support for Android WebView

arun8 picture arun8 · Mar 13, 2013 · Viewed 29.7k times · Source

I need to display WebGL graphics in my webview. Is there any way to modify Android WebView to enable WebGL. If yes, How?

Answer

yarons picture yarons · Mar 13, 2013

WebGL was not supported in WebViews before Android Lollipop. In KitKat, Android switched to Chromium as the native WebView implementation, but it is locked to Chromium 33, with no WebGL. In Lollipop, WebView is updated via the Play Store, and now supports WebGL. (source: https://developer.chrome.com/multidevice/webview/overview)

Trying to extend WebView to support it is next to impossible.

One thing you might consider, is use CSS 3D transformations instead of WebGL, those are supported on Android ICS and forward, see http://caniuse.com/#feat=transforms3d