New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add API to find out if application is currently active #13
Comments
@PrimaryFeather I've only just seen this issue/request .. was just wondering, looking at how the activation messages happen, would you not be able to tell this just from the Or .. presumably the above would only work on desktops, are you looking for this also on mobile? It shouldn't be too tricky if we just add an internal flag for this based on the events that have been dispatched... |
Hey @ajwfrost!
I must admit I can't remember if I looked at the The main reason I brought it up was because there are some Stage3D APIs that must not be called when the app is running in the background. If I could query the current state, I could avoid those calls altogether and wait for the app to come into the foreground again. Thanks a lot for considering such an addition! 😄 |
Feature Request
The NativeApplication class allows to listen for "Event.ACTIVATE" and "Event.DEACTIVATE" events. That way, it's possible to find out if an application is currently active. However, this only works if an application starts to listen for these events right from the beginning.
As a library developer, I can never know when my library is first used — thus, if my library is first invoked while the application is in the background, I can't know about that.
Thus, it would be great to have an API like
nativeApplication.isActive
that tells me about the current status.Adobe Tracker: https://tracker.adobe.com/#/view/AIR-4198418
The text was updated successfully, but these errors were encountered: