How to know when the screen is locked in adobe air on iphone?

90 Views Asked by At

I am aware of Stage.ACTIVATE and Stage.DEACTIVATE but this will fire when the app is in background.

Is there a way to know when the device screen is locked, from the background running app and from the foreground?

1

There are 1 best solutions below

2
lolo ok On

For screen is locked :

  • Add listener to your main class and listen Event.DEACTIVATE
  • Add listener to NativeApplication.nativeApplication 's instance and listen Event.EXITING

For opening application back :

  • Add listener to your main class and listen Event.ACTIVATE