Skip to main content
Participant
January 23, 2015
Question

NativeApplication Class Missing in AIR 13.0

  • January 23, 2015
  • 3 replies
  • 677 views

I'm using Flash Builder 4.7 with AIR 13.0. The only three classes I'm seeing in flash.desktop package are ClipboardTransferMode, Clipboard, ClipboardFormats.

My goal is to prevent mobile devices from sleeping during gameplay. If there's a different/better solution than the one I'm chasing then please let me know.

This topic has been closed for replies.

3 replies

Inspiring
January 24, 2015

You should not be building a new mobile app with AIR 13, it won't run on newer devices and operating systems. You'll get more features and better compatibility with AIR 16.

January 23, 2015

If you look at the API documentation, those 3 classes that you listed are the only non-AIR only classes in the flash.desktop package. To me that would suggest your project is not set to AIR but is set to some Flash Player version. I'm not familiar with the FB environment, so someone else will have to provide help on changing the project environment to be an AIR project.

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/desktop/package-detail.html

itlancer
Inspiring
January 23, 2015

You need to use:

NativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;

NativeApplication - Adobe ActionScript® 3 (AS3 ) API Reference

BrentRYAuthor
Participant
January 23, 2015

Thank you for your reply. As I stated in my post I am not seeing NativeApplication or SystemIdleMode in the flash.desktop package. Also, I believe you meant NativeApplication.nativeApplication.systemIdleMode as NativeApplication is a singleton and you access the instance through the nativeAppliation static getter.

itlancer
Inspiring
January 23, 2015

Yes, exactly, my mistake. I meant:

NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;