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
Dear developer, You could listen to the broadcast when the screen turns off to achieve your purpose.
1.3k Questions
1.7k Answers
2.1k Comments
950 Developers