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
You can check this events list from Cordova docs:
https://cordova.apache.org/docs/en/5.4.0/cordova/events/events.html
In particular Pause event:
The event fires when an application is put into the background. document.addEventListener("pause", yourCallbackFunction, false);
The event fires when an application is put into the background.
document.addEventListener("pause", yourCallbackFunction, false);