Reload game scene when take away Gear VR

Where can I find the function that turn off the Gear VR display ?

When you put on or take away Gear VR it turn off or on the display, I need to check this function or bool and add a function that reload my game level when the user take off the oculus
I done a search on all OVR codes but I dont found the class that do this, have someway to access when the player take away the Gear VR ? Or a bool or something like that

By now there is a solution for Unity 5. You have to use the Oculus Utilities for Unity 5. There you’ll have a bool property named:

OVRPlugin.userPresent

You may have to make sure there’s an instance of OVRManager present.

The mentioned OnApplicationPause does work, but only after about 10 seconds after you took the Gear VR off, which is too long for many cases.

get the Oculus Utilities for Unity 5 here:
https://developer.oculus.com/downloads

Source of solution:

hth, @justin_iSO

there is a method in OVRPlatformMenu called OnApplicationFocus…you may be able to call Application.LoadScene(“your scene”) within that to effectively reset the scene

I used this “hand made” solution to manage the standby:
Every second check the device time (hour, minutis and seconds express in seconds) and compared the data with a previously saved time (using PlayerPref).
if the current time exceeds the time saved for 15 seconds or more (my timeout) the viewer was in standby and i reload the scene. Otherwise i save the new time on the device.

Did you find an answer to this?