Skip to main content
Participating Frequently
January 22, 2013
Answered

How to identify if AIR applicaion goes background in IOS

  • January 22, 2013
  • 6 replies
  • 1528 views

How to identify if AIR applicaion goes background in air ios application.

Do we have any events to notify when app goes background?

This topic has been closed for replies.
Correct answer Colin Holgate

I'm not at my work machine right now, but you need to utilise the NativeApplication class to do this.


These are the listeners for telling when the app deactivates and activates:

stage.addEventListener(Event.ACTIVATE, fl_Activate);

stage.addEventListener(Event.DEACTIVATE, fl_Deactivate);

6 replies

Rdy076Author
Participating Frequently
January 22, 2013

Or do we have any ANE's to get notification when app goes background?

Inspiring
January 22, 2013

Yes, there is the activate and deactivate events you can listen for. No ANE needed.

This is a good book for adapting Flash for mobile. Highly recommended as it covers things like this.

http://www.packtpub.com/flash-cs5-iphone-development-for-ios-applications-using-adobe-air-cookbook/book

Rdy076Author
Participating Frequently
January 22, 2013

These events will work in desktop AIR appliaction. But I want for air application on IOS.

I am converting .swf to .IPA by using AIR SDK 3.5 to deploy application in ios - IPAD device. But these events are not firing when application goes backgroud or when I press home button.