title: Which function is called when application is removed from task manager
body: <p>I need to make status of user offline. When I press home button <code>onStop()</code> is called, that's fine. When I press back button <code>onDestroy()</code> is invoked. But when I close the app from recent apps by swiping it, <code>onStop()</code> or <code>onDestroy()</code> isn't called.</p>
  
  <p>I need to know when the app is closed from recent apps to do something (e.g make user offline).</p>