Skip to main content
Participant
May 23, 2014
Question

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

  • May 23, 2014
  • 0 replies
  • 1498 views

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

(https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.h

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.

This topic has been closed for replies.