Krpano Oculus/Android App (Cordova) Development - WebVR/XR

  • Hi All,

    I'm trying to develop an APK installable app krpano tour. This is because we need to showcase our virtual tours in an offline mode, and the current method of installing a localhost server isn't very user friendly.

    Using Cordova, node.js and Android SDK, I've got so far as a fully functioning Android app. The stumbling block, is the WebVR/XR API.

    As far as I understand, WebVR/XR can only be served through a browser/HTTPS which is why it will not work within an app on the Quest 2. Does anyone have experience of this and/or a solution? Is there a way of configuring webvr.js to point at a local WEBVR API? I know there is a webxr plugin for cordova but it looks long since abandoned (6 years).

    Any input or examples from anyone that has achieved this, or would like to achieve this, would be great.

    Tim

  • Tim -- I looked into this several years ago and gave up, especially for Quest headsets. If you search for Cordova in the forums here you will find several discussions. It sounds like you already did a Google search for "Cordova" WebXR and found the couple of GitHub pages that haven't been updated in years.

    If your primary purpose is to run your tours offline, a local server on the device is the easiest way to go. I recently did that for a museum client. More than that, they wanted the tablets locked down in kiosk mode so only the tour loaded onto the tablets was available to users -- no other apps or web surfing. Android proved the easiest for that. Just search for local host in the Google Play Store. You should find several options. The setup was straightforward. And if you want Kiosk mode -- running only your tour(s) and removing all aspects of the browser outside the page -- you will find that easily as well. Understanding that setup took a bit longer but still far easier than building an app in Cordova.

    For the Quest headset I had to sideload the local server but I can run tours locally on my Quest 2. I suspect it works just as well on the Quest 3. Consider using the Wolvic browser, which I believe can be used as more of a standalone app. You will need KRPano v1.21+ to work properly.

    There are several kiosk mode for Quest products available as well, if you need that, but they require subscriptions, from what I remember.

    At least that has been my experience.

  • Hi Scott, thanks for the reply. Yeah I read through all your posts, just thought there might be some fresh insight!

    I've been using a sideloaded localhost server, just wanted to put together a less clunky approach, and with a downloadable app we could update the tour without having to retrieve the headset from the client.

    Would be nice to know if it's possible, but like yourself the dev involvement required is making it unviable at the moment. But thanks for your suggestions on a kiosk mode, I'll look into that.

  • I have no personal experience using the below. I just did some research a while ago for a possible project that hasn't come through yet. You probably want a Mobile Device Manager that can provide kiosk mode and remote updates.

    ArborXR and ManageXR seem capable. Both have a free trial but require a subscription to use after that.

    Look into Progressive Web Apps as a way to strip away the browser interface and just display your tour. That's on my to do list. It looks very promising.

    Hope this helps.

  • To create offline tours:

    1) add a service worker to your project

    Integrating the Cache API with Service Workers
    Optimize your workers by using the Cache API.
    blog.openreplay.com

    After this step, the tour can be already be viewed offline.

    2) convert your tour into a PWA

    How To Turn Website Into A Progressive Web App (PWA) In 2023
    PWA helps you offer fast and reliable experiences to users. In this article, we show you how to turn website into PWA and gain a competitive edge in the market.
    magenest.com

    After these steps, the tour can be installed as an application on windows and Android. For Quest 2, see next step

    3) convert your PWA into a APK

    PWAs auf Oculus Quest 2  |  Articles  |  web.dev
    Oculus Quest 2 ist ein Virtual-Reality-Headset von Oculus, einem Unternehmen von Meta. Entwickler können jetzt progressive 2D- und 3D-Web-Apps (PWAs)…
    web.dev

    The apk can then be installed on the quest using SideQuest.


    Feel free to reach out for more details, but this should already give an idea of the steps involved.

    gr,

    Kristof

Participate now!

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