Hi to all,
How detect “Power” button pressing?
Thank you
Hi to all,
How detect “Power” button pressing?
Thank you
I don’t believe the power button can be directly detected, however, if your app is in the foreground, you will get a system even that your app is being suspended which you can detect. But you won’t know if it’s because the device went to sleep, was put to sleep via the power button or if the user switched to a different app.
https://docs.coronalabs.com/api/event/system/type.html
Rob
Thank you Rob.
I just want to pause a video streaming from Youtube, so I think it would help me.
Thanks
I don’t believe the power button can be directly detected, however, if your app is in the foreground, you will get a system even that your app is being suspended which you can detect. But you won’t know if it’s because the device went to sleep, was put to sleep via the power button or if the user switched to a different app.
https://docs.coronalabs.com/api/event/system/type.html
Rob
Thank you Rob.
I just want to pause a video streaming from Youtube, so I think it would help me.
Thanks