Question

I'm working on a software that includes 3D graphics. Those are massive enough, so I decided to use OpenGL to keep a quite fluent animation. I selected THREE.js graphic library (WebGL).

Reading the html through a Web browser works very well : WebGL functions are recognized. I did it on my desktop (Win32/Firefox17, please do not judge me on my configuration !) and on a Nexus 10 (Android 4.3, FF24 and FF25Beta, tried with Chrome30Beta but no joy...). But I need to access native data, like the file system, to get informations for my program. So I wrapped my code with WL, and deployed it as an app on my Nexus 10... And so disappeared the WebGL capability... :(

So I looked for a reason to that : I found on the IBM site two different ideas : in one way, I understand that a JS engine is embedded, in another that WL uses the engine of the default Web browser of the tablet (what I understood the first time)...

Let's be precise with the different engines : On the Nexus, FFs have obviously Gecko engines, Chrome30 is a Blink (webkit-like, version 537.36). Those are the ones detected by window.navigator.useragent as I read directly in the browser, no surprise. In the Eclipse/WL preview, I got different interpreters, depending the browser I selected, FF or IE (not Safari, I don't have it installed), but not the one from my desktop (the ones used are even older than my own FF...). But, when I detect the one used in the app (after wrapping in an apk), it returns an AppleWebkit 534.30/Worklight/6.0...

Maybe I'm wrong (tell me), but if 'Worklight' is in the version of the engine, and if webkit is used even when I suppress Chrome from my tablet (the version is different, but who knows..), I wonder that, for this app, as it's configured, the engine is embedded by Cordova or WL. If it is so, I agree it allows to read a code with a fully-compatible interpreter, regardless the browser installed on the hardware. But when a webkit engine does not please you for the functions it supports (like WebGL, very partially supported), it looks a problem for me.

Does anybody have a confirmation of how it works ? If the engine is wrapped with the app, do you know if we can choose the one to be included, or configure it (like enabling WebGL ;) ) ? Another idea ?

Thanks,

Vincent.

Was it helpful?

Solution

Worklight applications do not bundle an interpreter. The application will use what that is bundled in the OS.

In other words, the default WebView in Worklight is the one that the OS provides, in the case of Android it uses the bundled WebKit.

This is not something Worklight controls what-so-ever.

You could, maybe, somehow, bundle in your app the Firefox engine libraries and hook it all up together, but the task to do so is incredibly large and complex in size... and not supported by IBM Worklight. Also, I do not know whether Cordova supports this as well ( it is used in Worklight to interface with native functionality).

As for the useragent, the string "Worklight" is attached to it as part of support for IBM WebSphere Portal.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top