+1 vote
by (340 points)

I'm looking into setting up some code that makes sure our app cancels a download before the headset turns off and was wondering if there is a way to detect the power button being pressed
so I can call this code.

I'm using the Unity Legacy SDK

1 Answer

0 votes
by (55.5k points)

Dear developer,
You could listen to the broadcast when the screen turns off to achieve your purpose.