How do I know when the app has become active? That is, when the user opens the app for the first time OR when they switch from one app this this app? Also, how do I know when they closed my app?
Reason is because if they are out for a minute I need to log them out otherwise I need to keep them logged in. What are the functions in ionic that I’m looking for?