How to alert the user when a background/foreground service completes after device is asleep
I am running a foreground service that takes anywhere from 30 seconds to 5 minutes to complete. I want to play an sound from the headset once the operation is complete, however all of my attempts seem to fail. I have tried using wake locks, local-notifications, and alarms but I can't seem to get the headset to make any noise until it wakes back up when the user places the headset back on. Once you hear the boop from the headset signaling that is asleep there doesn't seem to be any way to get audio from there on. Does anyone know how I can either wake the headset, prevent it from falling asleep, or play sound while the head set it already asleep? Sending a notification to the quest app would also work.343Views0likes0CommentsOpenXR Spatial Anchors don't provide valid pose when sleeping then waking
I'm not sure exactly what update caused this, but it's within the last few months. The spatial anchors for my project stop getting valid poses when our Quest 3s either sleeps on their own or the power button is pressed. On wakeup, the positions and orientations don't line up where expected (it's as if we had a recenter event) and the XrSpaceLocationFlags bits are all false For example: XrSpaceLocation persistedAnchorLoc = {XR_TYPE_SPACE_LOCATION}; XrResult res = xrLocateSpace(anchor.space, m_space, predictedDisplayTime, &persistedAnchorLoc); if (res == XR_SUCCESS) { XrSpaceLocationFlags flags = persistedAnchorLoc.locationFlags; bool valid = (flags & XR_SPACE_LOCATION_ORIENTATION_VALID_BIT) != 0 && (flags & XR_SPACE_LOCATION_POSITION_VALID_BIT) != 0; bool tracked = (flags & XR_SPACE_LOCATION_ORIENTATION_TRACKED_BIT) != 0 && (flags & XR_SPACE_LOCATION_POSITION_TRACKED_BIT) != 0; bool anchorIsValid = valid && tracked; // These are both always false upon wakeup // persistedAnchorLoc.pose also appears to be incorrect // ... } I have found, however, if I add a new anchor after wakeup the old anchors start getting valid poses again. It's definitely a timing issue though too. I can't immediately generate a new anchor (the frame during the wakeup) so I end up with a really ugly hack that waits some time before generating a temporary anchor to fix the current anchors. I have tried the official samples and I found the same behavior. I could add anchors in the XrSpatialAnchor sample, sleep the headset, wakeup and find they are all missing. When I add a new anchor, all the previous anchors appear again. I'm not sure if it's relevant or not, but I do have Developer -> Boundary disabled. This is a requirement for our application since the guardian area can't grow large enough. This is all used in-house, so it's not a problem for our users.1.6KViews1like1CommentPrevent Animation reset in animation player
Hello, I was doing a forest installation with quill, and I ran into couple of problems and I hope someone may know how to prevent this. First thing what I needed is to virtual environment stay in place when the quest turns off after putting it down which makes the forest not fit or fit unproperly in the space. Is it possible somehow to prevent this from happening? and the second thing if it would be possible to prevent quest from turning off after putting it down ( rather slee) then I wouldn't run into the first problem. Thanks. Hopefully someone can help.610Views0likes0CommentsAfter Quest 2 HMD goes to sleep while running my app, scene is offset when HMD awakes
My application is built using Unity 2020.3.36 and Oculus XR plugin 1.12.0 When my app is running if remove the HMD and the HMD goes to sleep, when I put the HMD back on the HMD wakes up and the app resumes, but the camera view is offset from where it was when I took the HMD off. There is no way to correct this without restarting the device. Is there a setting in the OVRCameraRig or some api for forcing my rig to update to new tracking coordinates when it it resumes? What else could be the cause of this?1.5KViews1like1CommentAnyway to prevent the Oculus from going to sleep-mode/freeze-mode
Hi! We are currently using the Oculus rift on a exhibition, however.. we are experiencing some issues with our Unity-application from time to time freezes.. We noticed that the Oculus for some reason decides to freeze the last frame once you remove the HMD from the head, so we covered the light-sensor with a pice of tape. This works for now.. but I really dont think this is a solid way of doing it... so is there anyway to disable this "freeze-mode"? We have also noticed that if the Oculus isnt used for a few minutes, the application also freezes on the last frame, we are currently not sure if this is caused by the Oculus rift or some other part of the system, but is there some sort of "idle-timer" kicking in when the oculus hasnt detected change in position/rotation for a while?.. if there is.. then is there a way to disable this? Our goal is to be able to use the Oculus without any freezing for at least a few hours (at least 10h) Regarding all the freezing.. Im not sure if this is a part of the Oculus runtime/"driver", or if its a part of Unitys implemenmtation of the runtime/SDK... but no matter... PLEASE consider changing this behavior.. it would be extremly much more helpful to simply give the developers and event to listen to and then take which ever action they prefer, then to "lock" your developers to do things the way Oculus thinks we want to use the hardware.. we are for this very reason now considering switching to the HTC Vive since it appears to be a more solid pice of software and hardware. Is the freezing anything anyone else can relate to?11KViews0likes11Comments