Possibility to detect if Quest is active

Is there a function in XR that can be triggered to check if the headset is worn by the user or is lying idle?
Would like to know if such a function exists in Quest devices.

Earlier for Oculus, it was done this way:

if (!OVRPlugin.userPresent && m_wasUserPresent){
  
}

It seems like they’ve updated the API to fire different events instead: