Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Podden's avatar
Podden
Protege
11 years ago

Possible to start GearVR App as normal Android App?

Essentially what I want to do is showing a network/graphics configuration menu for the app when started normally from the android launcher and when started from Oculus Home/VR Dev Mode it starts in VR Mode.

Is this possible?

9 Replies

Replies have been turned off for this discussion
  • Unfortunately, this is not currently supported. Turning VR on and off is not as simple on Android as it is on PC. I would suggest building two separate APKs for now.
  • I have a similar problem (I'm planning a companion Android App for configuration + editing of my Gear VR App's data)

    Is there a way for the Android App to directly access the files in the Gear VR App's sandbox (persistent data path)?
  • There isn't currently a supported or simple way to build an APK that works in both VR and non-VR mode. It would involve changes to the AndroidManifest (vr_only to vr_dual) as well as non-trivial changes to the built Unity Android player in the APK. I would suggest building two separate APKs for now: one with VR support enabled and one with it disabled.
  • Thanks for your reply vrdaveb,

    I've build 2 separate APK's now. They both should be able to access the same data, but I can't find a way to access files in the other APK's sandbox. Maybe there is no way, and instead of storing the data inside the sandbox, I should store it in some public folder? Is there a recommended place to store data used by several APK's?
  • Thanks!

    When I sign both APKs with the same certificate and set the same sharedUserId in both AndroidManifest files, I can access files in the Gear VR APK's sandbox from both APKs (exactly what I needed).
  • Today, I updated from Unity 5.1.2f1 to 5.3.0f4.

    It seems, now both APKs (Android and VR) must be signed with the oculussig (before, I only signed the VR App with the oculussig and both with the same Android certificate and same sharedUserId).

    When I don't sign the Android APK with the oculussig, I get this when launching the VR App:

    Thread priority security exception. Make sure the APK is signed.
  • ftofoli's avatar
    ftofoli
    Honored Guest
    I was wondering if there's any update regarding the use of the vr_dual flag?

    The intent would be to be able to start an application in "2d" mode to collect user credentials, etc... and then switch to VR mode on demand.

    As of November 2015 the status of this functionality was "There isn't currently a supported or simple way to build an APK that works in both VR and non-VR mode", how about now?

    I know support was not complete in previous SDK releases, and even if one was able to use this mode, would an application using it be accepted into the store?