Flex iPad Application : Run code before application enters background Application Type: Flex Mobile Application Target Platform: iPad AIR Version: 4.0 Development Environment: Flash builder 4.6 I want to run some code just before iphone application
Application Type: Flex Mobile Application
Target Platform: iPad
AIR Version: 4.0
Development Environment: Flash builder 4.6
I want to run some code just before iphone application goes into background. I need function similar to didEnterBackground
of native xcode app
tml#//apple_ref/occ/intfm/UIApplicationDelegate/applicationDidEnterBackground:)
I tried using devactivated function of flash.display.STAGE.
I used following addEventListener:
STAGE = this.parent.stage;
STAGE.addEventListener(Event.DEACTIVATE, onAppDeactivated);
It worked for me but only when device is connected to development environment in debug mode. When I create my release build
it is not working.
So how can I make sure that my code runs before application goes into background.
