googlevr / gvr-android-sdk

Google VR SDK for Android
http://developers.google.com/vr/android/
Other
3.28k stars 1.28k forks source link

Launching other apps while complying with UX-D9 #570

Closed rawnsley closed 6 years ago

rawnsley commented 6 years ago

My app is all VR with no 2D views. However, the user can launch web links from within the app that will be opened with the browser of their choice using a regular Android ACTION_VIEW Intent.

On standalone Daydream devices like the Solo this is fine because the only browsers are 3D.

On mobile Daydream of Cardboard devices this is likely to launch a 2D browser, but this is contravenes UX-D9: App never goes to 2D unexpectedly

We can't know if the browser will be 2D or 3D so what is the recommended flow?

sigmaxipi commented 6 years ago

Unfortunately, there is no clean solution because other browsers don't advertise if they have VR support enabled. You could use the launch2dActivity demonstrated by VrVideoActivity to be safe, but that would result in an awkward flow if the target Activity supports VR. You could also scan the installed packages for com.google.intent.category.DAYDREAM and only launch the Intent if you can find a browser that works with Daydream.