Skip to main content
Participant
Jan 23, 2015 5:58 PM UTC
Question

NativeApplication Class Missing in AIR 13.0

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 is closed to new replies. Start a new post to keep the conversation going.

7 replies

Inspiring
Jan 24, 2015 1:08 AM UTC

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.

Translate
Jan 23, 2015 9:52 PM UTC

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

Translate
itlancer
Inspiring
Jan 23, 2015 6:53 PM UTC

You need to use:

NativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;

NativeApplication - Adobe ActionScript® 3 (AS3 ) API Reference

Translate
BrentRYAuthor
Participant
Jan 23, 2015 7:22 PM UTC

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.

Translate
itlancer
Inspiring
Jan 23, 2015 8:07 PM UTC

Yes, exactly, my mistake. I meant:

NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;

Translate