Is there some kind of function that I can call that listens to whether the app is about to exit, or close or go into the background.. Basically any event that means \"the user h
This code works in ionic2 native app exit and in the browser as well. In the browser, this happens when the URL reload button is pressed or the browser tab is closed.