Developing native Android app - WebGL problem

  • Hi everybody.

    I am currently developing an android app that embeds the html pages created by krpano and displays them inside an android WebView.
    I've managed to render the virtual tour without problems.

    But, on one of my devices, even if the FAKE VR support is enabled I cannot see the cardboard icon and the ENTER VR button.
    I think the fault is of the device, which has Kit-Kat and is missing the WebGL feature, is this true?
    On the chrome browser there are no problems, it's only fault of the internal web browser used by the app (WebView).

    Since the WebView used by android has support for WebGL only starting from WebView 36 (which comes shipped only in Lollipop),
    Does anybody know a workaround or has successfully used the WebView to view in-app VR on smartphones with Kit-Kat or below?

    Here there are some more useful infos: http://undefined

    Namastè.

  • Quote

    Since the WebView used by android has support for WebGL only starting from WebView 36 (which comes shipped only in Lollipop),
    Does anybody know a workaround or has successfully used the WebView to view in-app VR on smartphones with Kit-Kat or below?

    Yes, see my post. You can download the free app and run full VR on any device from Ice Cream Sandwich upwards. No need to fake VR when you can make an app that fully supports WebGL.

    Pano Runner - Android App for Krpano

    Have a look at this for more information on using the Crosswalk WebView in order to make an App that has WebGL for OS 4.0 and upwards..

    https://crosswalk-project.org/documentation/…/cordova_4.html

    Regards
    James

  • Thank you very much, Tubbritt.
    Saving me is becoming quite an habit, for you. *smile*

    (however, this time I did find out the solution by myself) *thumbup*

    Your tip is super-right, the best way to add support for WebGL on versions before Lollipop is to use a XWalkView (which comes from the cordoba crosswalk project) instead of the default android WebView.
    I'm managed to do so and I'm pretty happy with the result.
    It seems to me that the XWalkView is slightly faster, too.
    For anyone who's interested, I've followed these simple steps in order to add the xwalk library under maven and use all of the features of XWalk: https://diego.org/2015/01/07/emb…android-studio/ .
    This guy also uploaded a small repo on githubo, if you wanna have a look (it's an android studio project): https://github.com/dougdiego/CrosswalkDemo .

    The only downside of using Crosswalk is that is uses a lot of phone permissions, so you really have to convince your users that you're app is great! *squint*

    Namastè

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!