You are not logged in.

Dear visitor, welcome to Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.


Wednesday, July 3rd 2019, 5:02pm

How to fix Error: HTML5 browser with WebGL […] support required, when running krpano via phonegap in Android Studio?

I want to run Krpano code as a standalone app. After some tweaks in Xcode, it works
great on iOS (including VR mode), but on Android, I have no idea how to get past this error.

I KNOW this is not pure KRPano question, as the solution lies outside krpano code itself, but still, I know people have been doing it for years, I've read posts about is on this forum too years ago.

I've done an extensive search, and no answers are safisfactory. I've been pursuing a couple of options so far:

•Adding this code (to somewhere) in webview classes or android sdk files:

$ publicabstractvoid setAllowContentAccess(boolean allow);
$ publicabstractvoid setAllowFileAccessFromFileURLs (boolean allow);
$ publicabstractvoid setAllowUniversalAccessFromFileURLs (boolean allow);
$ publicabstractvoid setAllowFileAccess(boolean allow);


•Adding this code (to somewhere?) in the "activity" (i presume a Cordova file, class..?):

$ myWebView.getSettings().setAllowFileAccess(true);
$ myWebView.getSettings().setAllowContentAccess(true);
$ myWebView.getSettings().setAllowFileAccessFromFileURLs(true);
$ myWebView.getSettings().setAllowUniversalAccessFromFileURLs(true);

Source: Problems using krpano locally in Android and iOS

•Somehow using CrossWalk (though latest update was in 2017-discontinued)

Basically, the aim I presume is to somehow enable WebGL in Android's
WebView, either by making changes in Android Studio, or by some command
in Cordova/PhoneGap.
I know some people managed to solve this, just how, remains unclear.