cancel
Showing results for 
Search instead for 
Did you mean: 

GearVR Display doesn't come back on after removing headset (Unity 5.6.3p4)

super78
Honored Guest
We're having a rather odd issue after a couple of our GearVR phones updated to Android 8.
On Android 7 we could remove the headset then put it back on and the display would come back on and we could continue playing.
However after our phones went to Android 8, you can remove the headset and as long as you put it back on in < 5 seconds the display will come back, but if you wait longer the display stays black. During this you can still hear audio coming from the headset, but nothing shows, and a small white X displays in the corner when you remove the phone.

We have tried apps off the Oculus store on the same phone and not had this issue, so our best guess it's either due to our Unity version (5.6.3p4) or something specific to our app.

We are unable to downgrade the phone OS because of Samsung, and we have tried more recent Unity 5 versions all with no luck. We are out of ideas at this point and our phones are unusable, so any advice or suggestions would be greatly appreciated.

Our phone model is SM-G950U1

EDIT:
I should also mention that we use single pass stereo rendering, although this did not cause an issue on Android 7.

These are also the last two messages from the logcat, though I'm not sure of their relevance:
02-22 12:35:25.014 29180 29180 D Unity   : SetWindow 0 0x0
02-22 12:35:25.028 29180 29246 D Unity : [EGL] Attaching window :0x0
02-22 12:35:25.276 29180 29180 D Unity : SetWindow 0 0xdee76008
02-22 12:35:25.277 29180 29180 D Unity : SetWindow 0 0xdee76008
02-22 12:35:25.288 29180 29246 I Unity : Skipped rendering frame because GfxDevice is in invalid state (device lost)
02-22 12:35:25.288 29180 29246 I Unity :
02-22 12:35:25.288 29180 29246 I Unity : (Filename: ./Runtime/Misc/Player.cpp Line: 778)
02-22 12:35:25.288 29180 29246 I Unity :
02-22 12:35:25.293 29180 29246 D Unity : [EGL] Attaching window :0xdee76008
02-22 12:35:25.317 29180 29246 D Unity : ANativeWindow: (2960/1440) RequestedResolution: (0/0) EGLSurface: (2960/1440)
02-22 12:35:25.338 29180 29180 I Unity : onResume
02-22 12:35:38.500 29180 29180 I Unity : windowFocusChanged: false

1 REPLY 1

super78
Honored Guest
We had been removing the OnPause() functionality of the UnityPlayerActivity for older versions of Android which would break networking when the headset was removed. Turns out they patched that bug with Android 8, and removing the OnPause() code was causing it to break again.