How to switch between VR and non-VR mode, as in the "Samsung Gear 360" app, with Unity + Android?

Hi there, I'm developing a simple app in Unity and wish to be able to switch between starting in non-VR mode, then switching into VR mode. This is much in the same way as the Samsung Gear 360 app does when you click on the "View on Gear VR" button on the top-right.

When enabling "Virtual Reality Supported" in the Android tab of the Unity Player Settings, the app will always require the Gear VR to start up, which is less than ideal. And once its running there's no way of switching out of VR, even when a script disables the suggested "VRSettings.enabled" flag, which simply doesn't seem to do anything.

Comments

Apps that support VR and non-VR modes today have to use separate APKs and send intents to each other.

At some point, we plan to add support for "dual mode" in a single APK, but it will take changes in VRSVC that we can't expect to land within the next month or two. When dual mode works, you will be able to toggle it with VRSettings.enabled, but unfortunately it isn't clear when that will be.

Ah i see, thanks for the response! Do you know of any tutorials or resources where I could learn how to this sort of thing?

And also is there any sort of roadmap that I can keep up with to know when "Dual Mode" is being tackled and does indeed come through? Because if it were to say come through by January next year then that might not be a problem with the schedule I'm working towards.

Hi @vrdaveb, just wanted to check on whether the "Dual Mode" feature is available now. We are developing a similar Android app that needs to start in non-VR regular mode and then have the option to switch to VR mode with the Samsung Gear VR. Thank you!

@imperativity , @vrdaveb , if the recommended solution is to have two APKs communicate, what's the recommended way to distribute these APKs? Does the oculus store support distributing and installing multiple APKs as part of a single "app" that the user would download from the store?

Dual mode is still on the roadmap but not available at this time as it is considered low priority.

There is no guidance from the store on how to achieve this, but some developers will have the VR app on the oculus store as keys only and then have it interface with a non-vr app on the phone. As far as I am aware, the store does not support a multi-apk distribution as one app.

The code in the previous post certainly will not work, as GearVR at the moment does not support this kind of dynamic switching. So i think it is better if you would remove your code snippet, as otherwise it simply would cause unnecessary confusion on people looking in this thread for help .