You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a way to get a call back when the application goes background or foreground. But there is no way to get the application isActive value (a.k.a. foreground/background state) at any moment. The problem is that I don't know the application state until I subscribe to the appStateChange event AND the app goes background or foreground. JavaScript can start working while the app is in background (e.g. when you minimize the app during the splash screen) so I can't just say «it's foreground initially».
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.
Feature Request
Describe the Feature Request
There is a way to get a call back when the application goes background or foreground. But there is no way to get the application
isActive
value (a.k.a. foreground/background state) at any moment. The problem is that I don't know the application state until I subscribe to theappStateChange
event AND the app goes background or foreground. JavaScript can start working while the app is in background (e.g. when you minimize the app during the splash screen) so I can't just say «it's foreground initially».Platform Support Requested
Describe Preferred Solution
Add a method to the App plugin:
Related Code
Additional Context
https://stackoverflow.com/q/60435042/1118709
The text was updated successfully, but these errors were encountered: