Search code examples
actionscript-3apache-flexflash-builderflashdevelop

Is it possible to use AS3 to detect when a flashbuilder app is in background or foreground?


I have an app that runs on both ios and android, built in flashbuilder ( Im using Flex 13 as the SDK ). The app continues to run in the background on both platforms when a user switches to another app or the device goes into sleep mode (screen goes off, etc.)...

The background functionality works great, but I want to try to detect when the user brings the app to the foreground (i.e. resumes use of my app) OR my app goes to the background (user switches to ANOTHER app or device goes into sleep / suspended mode).

Is this possible with AS3?


Solution

  • I believe you're looking for the ACTIVATE and DEACTIVATE events.