You are not logged in.

Scott Witte

Intermediate

  • "Scott Witte" started this thread

Posts: 299

Location: Milwaukee, WI USA

Occupation: Professional Photographer

  • Send private message

1

Saturday, January 18th 2020, 9:02pm

Phonegap/Cordova for Oculus??

I have seen Phonegap mentioned a couple of times as a way to run a VR tour locally on GearVR, Oculus Go, etc. I have looked into it and always run into a dead end. Has anyone actually done this? If so, could you give at least a hint on what is needed to pull it off?

Posts: 8

Location: NYC

Occupation: 3D Artist / Designer

  • Send private message

2

Wednesday, January 29th 2020, 12:01am

This is something I'd be interested in as well. Having clients type in a URL into the Oculus Go Browser is less than ideal.


I've been successful in using service workers to create a PWA version of a tour for phones/tablets but with iOS's cache limitation of around 50mb I need something more robust. A phonegap or cordova version would be ideal.

@Scott,

If no one responds I may have some time to investigate this in the near future. At present we use KRPano to build a VR tour for web/mobile and we have completely seperate tedious process through Unity to build essentially a duplicate version for Oculus Go. If I could build the experience once through KRPano and just do small tweaks for each platform it would save a lot of time and headache.

Edit:
Found this post
https://krpano.com/forum/wbb/index.php?p…&threadID=16316

Scott Witte

Intermediate

  • "Scott Witte" started this thread

Posts: 299

Location: Milwaukee, WI USA

Occupation: Professional Photographer

  • Send private message

3

Wednesday, January 29th 2020, 1:38am

I've been working on an Oculus App option for quite a while. I went down the Phonegap/Cordova path a couple of times and always hit a dead end, although I have seen it recommended a couple of times here. But it doesn't seem anyone has actually done it. Just Google Phonegap|cordova Oculus and you will see essentially nothing useful. I fear it isn't possible, especially since we need WebVR capability.

I started building my own apps with Unity and Android studio. For reasons you mentioned I essentially wanted to create a very simple VR web browser app that would run a tour stored locally -- which isn't so simple to do. The best option seemed to be using Geckoview, the basis of Firefox Reality. Essentially I wanted to create a really stripped down version of FxR to run a tour locally. I ran into a problem integrating WebVR. That is still experimental and not documented. And frankly, I was getting in over my head trying to do this kind of project. On top of that, Geckoview seems a little slower than what the Oculus browser offers.

So, my current solution is to run a local web server on the headset or phone, store the tour locally and run it in a browser. FxR is near ideal in that it is so clean visually compared to the Oculus browser and you can set the tour as the homepage, making it almost like a tour app or PWA. But.... you still have that slight performance hit and it isn't available for Gear VR and certainly not iOS. Sideloading it hasn't worked for me on Gear VR -- and I have plenty of experience sideloading other apps -- so I am really perplexed by that. You can sideload it to the Quest and it is available for Vive.

When I started this project I thought it would be simple enough. For me, it hasn't been.

Posts: 8

Location: NYC

Occupation: 3D Artist / Designer

  • Send private message

4

Thursday, January 30th 2020, 1:43am

Spent most of the day playing with this. It appears there is something in PhoneGap's build process, I imagine somewhere in the AndroidManifest/Config files that prevents the Oculus Go from recognizing the apps even when side loaded. Not sure, this is where it starts to get beyond my level of understanding.

Really wish there was a solution available to this...If someone has any insight please contribute!

Scott Witte

Intermediate

  • "Scott Witte" started this thread

Posts: 299

Location: Milwaukee, WI USA

Occupation: Professional Photographer

  • Send private message

5

Thursday, January 30th 2020, 2:11am

Howdy Steve,

Are you trying to do this just with Phonegap or in conjunction with Android Studio or something else?

I assume you are including an osig file. Don't think any non-certified app will run without it.

Posts: 8

Location: NYC

Occupation: 3D Artist / Designer

  • Send private message

6

Thursday, January 30th 2020, 8:28pm

Hi Scott,

This is just producing the app via phonegap. I tried adding the osig file as you suggest in what I think is the appropriate place and no dice. I don't see the app under unknown sources.

This is where things get weird but it may help us in trouble shooting. We use this Kiosk mode application https://oculusgokioskmode.tweaklab.org/ with our Unity apps on the Go to essentially lock the headset to our app when we send them to clients. It works fine with our regular Unity apps. Via Kiosk Mode or through command line adb I can install the .apk I get out of PhoneGap. With Kiosk mode I can force the Go to attempt to run the app and when I do I see a 'Please Wait' screen that I believe comes from PhoneGap. The Go doesn't really do anything and the "Please Wait screen" flickers and I can see the normal Go home screen. However, if I then uninstall Kiosk mode and put on the Go all of the sudden I am in my app in windowed mode. It kind of looks like it's in the normal Oculus web browser but I've got none of the extra browser UI. I can interact with my tour, go through hotspots, etc , but it doesn't respond to my head movement so it's just clicking through a window. If I navigate to any other Oculus screen the tour disappears and I can never get back to it. Strange.




Scott Witte

Intermediate

  • "Scott Witte" started this thread

Posts: 299

Location: Milwaukee, WI USA

Occupation: Professional Photographer

  • Send private message

7

Thursday, January 30th 2020, 11:00pm

Steve,

I believe what you are experiencing is why you would want to import your PhoneGap app into Android Studio to get full interaction with the Go -- IF that would actually work. Mostly I have seen where that hasn't fully worked although I don't really understand why not. You can find info on the web about importing PhoneGap into Android Studio pretty easily. Importing into Unity seems much more problematic.

Posts: 8

Location: NYC

Occupation: 3D Artist / Designer

  • Send private message

8

Friday, January 31st 2020, 4:51pm

Tried a few things yesterday with no success. I'm not android developer by any means so I'm little out of my depth.

I was able to import my project into Android studio and I tried swapping out large parts of the AndroidManifest of the Phonegap app with parts from our working Unity app. Was able to build the app but it doesn't work, and maybe this was even pointless to try, I really don't know.

Basically the only thing to report on is that if you force the Oculus Go to try to load the app it just displays a flickering 'Please Wait' screen that appears to be part of Phonegap.

I've done my fair share of googling and can't find any sort of path forward.