title: Track android application when closing application from application stack
body: <p>I am new in android and trying to find solution to track android application termination events like </p>
  
  <ol>
  <li><p>when we remove application from application stack, application is closed but i could't find any method that track closing event</p></li>
  <li><p>when device got shutdown because of law battery application is closed but event could't be tracked</p></li>
  </ol>