Looking for a way to see if an application is closed
<p>Is there a good way to check if an entire application (not an activity!) is closed by the user? I want to log the time a user spends using the application, so a simple activity <code>onPause()</code> ,<code>onStop()</code> or <code>onDestroy()</code> is not sufficient.</p>

<p>There are several ways an application can be closed, either the user pressing the home button, search button or simply leaving the application. Is there a unified (eg. simple) way to see if any of these things happened?</p>
