title: stop thread on exiting app
body: <p>i need to stop/interrupt a thread made by myself when exiting my app. how can i do this?
  it should be albe to click on any activity the home button and it should end the thread.</p>
  
  <p>basically the thread i created acts as a session and when one logsout or his session time expires or the app closes then i need to stop the thread. i've managed that for the first 2 cases, but i'm not ble to do it for the third case. infact once i go out of the app in my logCat i can see the thread and when it naturally dies i get a toast notification (which i clearly dont want). tahnks!</p>