Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
RedpillVRDemo's avatar
RedpillVRDemo
Honored Guest
1 year ago

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.

No RepliesBe the first to reply