I have a web project (depends on WebGL) which works on computers, any browser. Now I am trying this project to be opened as an application on Android based mobile phones. I used WebView to accomplish this. My phone (Nexus 3) had Android 4.3 and as I learnt afterwards before Android 5, WebView component didn't support WebGL. With Android 5, WebView became an updatable independent component which depends on Chromium version 37 (can be updated) and started to support WebGL. So the error I was getting with Android 4.3 is expected.
After this I tried using another phone (Samsung galaxy S4 with Android 5 and Chrome version 43 on it). So then the application should have worked well, but still got error on WebView. I tried get.webgl.org still the same error:
Error constructing CesiumWidget.
Visit http://get.webgl.org to verify that your web browser and hardware support WebGL. Consider trying a different web browser or updating your video drivers.
Detailed error information is below:
RuntimeError: The browser supports WebGL, but initialization failed.
Error
at new RuntimeError (http://192.168.43.125:8090/TMAPW/lib/Cesium/Build/CesiumUnminified/Cesium.js:10657:19)
at new Context (http://192.168.43.125:8090/TMAPW/lib/Cesium/Build/CesiumUnminified/Cesium.js:96489:19)
at new Scene (http://192.168.43.125:8090/TMAPW/lib/Cesium/Build/CesiumUnminified/Cesium.js:120928:23)
at new CesiumWidget (http://192.168.43.125:8090/TMAPW/lib/Cesium/Build/CesiumUnminified/Cesium.js:130986:25)
at AMouseListener.Map2D.initWidget
This still seemed like a configuration problem, so then I tried to open this on Chrome not on WebView yet still the same error. I enabled WebGL on Chrome following instuctions. `Firefox works fine though. I have three questions:
Does there seem to be anything I am doing wrong, how can I fix it?
Does Android still not support WebGL on WebView, isn't there any possible way to open WebGL dependent applications?
Is there any other way to open a WebGL project as an application. (I have read about
cordova
andcocoon.js
but not sure if it can be accomplished through these.) So if there is one which works fine I'd rather go directly for it.
I suggest you try CrossWalk, based on Chromium/blink
https://crosswalk-project.org/documentation/samples/webgl.html