Is there a system suspend event in AIR?
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.
精彩评论