Check if app is background or foreground



is possible to detect in code if app is app is background or foreground?



Can you be more specific? Is it iOS or Android you are looking for? Whats is your use case, none of the code written in your pages / components would keep running when app is sent to background but only the background services / tasks.