开发者

Is there a system suspend event in AIR?

开发者 https://www.devze.com 2023-02-08 13:58 出处:网络
Can an Adobe AIR applica开发者_如何学Pythontion detect when the host system is put to sleep/suspend?check out the userIdle event from the flash.desktop.NativeApplication class.

Can an Adobe AIR applica开发者_如何学Pythontion detect when the host system is put to sleep/suspend?


check out the userIdle event from the flash.desktop.NativeApplication class.

you may also prevent the system from becoming idle by setting the systemIdleMode property:

//Prevent
NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;

//Allow
NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.NORMAL;

if neither of those options suit your needs, you can always use NativeProcess to handle processes on the host operating system.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号