Do you mean when the "Back" or "Home" buttons are clicked? Or when app is terminated? You can't actually track the termination event.
To track the close event, you can override "onBackPressed" event.
To trach "Home" button, override "onKeyDown" and track key code "KeyEvent.KEYCODE_HOME".
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.