+1 vote
by (180 points)

Hi everyone,
I'd like to use the sleep & screen of delay. I'm using Pico Neo 3 Pro, PUI Version 4.5.30 and UE4 SDK Version 2.0.3.5 and UE4 4.27.
Sadly both functions don't have any impact at all as I can tell. In the industry settings I also turned off auto sleep mode.
Also the Sleep Delay node doesn't trigger the specified delegate event, as if nothing seems to happen at all.
BlueprintSetup
Am I doing something wrong?
Best

2 Answers

0 votes
by (39.2k points)

Dear developer,
This is our test apk.
https://bytedance.feishu.cn/file/boxcn65MrX8kz6QszBy4fJQIGpc
When the program enters the scene, press the Trigger key on the controllers, and if successful, you will see Log: Sleep Delay:0.
It would set the Screen OFF Timeout: Never; System Sleep Timeout: Never.
enter image description here

by (180 points)

Ok, I've got a little further. Before the nodes were connected to "Event Begin Play". It seems I need to add in a small delay, otherwise the nodes don't seem to work, probably because the XRSystem API isn't correctly set yet? I simply have it as a component in my blueprint - is there another way? It seems a bit annoying to work with something like a delay to get the nodes to work.
But then still, I've put in a Time of 5 Minutes for both Sleep and Screen Off Delay, I get the Log Message "Sleep Delay 0" (successfull), but the screen and device still go to sleep after about 40-50 seconds.

by (39.2k points)

Dear developer,
There is a TobService in the system that needs to be bound to the program, and the XRSystem API needs it to modify the system.
So the XRSystem API needs a little delay to take effect.
Sleep and Screen Off Delay Time You can check whether the change is successful in industry Settings.
enter image description here

by (180 points)

Is there any way to check if the XRSystem API is ready? Or is putting in a few seconds delay the only way?

0 votes
by (39.2k points)

Dear developer,
Currently there is no way to check if the XRSystem API is ready.
Perhaps you can do this by using the PXR Get Device Info interface.
Use the DEVICEWIFISTATUS or WIFINAMECONNECTED values to determine the connection.
If the connection is not successful, continue to run PXR Set Auto Connect Wifi.
For more information of PXR Get Device Info, you can click on the following link:
https://developer.pico-interactive.com/docs/en/12058/225861/#_7-10-1-common-interface

...