title: How to Send custom google Analytics event when user kills the application in Android
body: <p>I need to send google Analytics custom even when the user kills the application.</p>
  
  <ol>
  <li>I tried Service.onTaskRemoved() but could not preserve Analytics object till this is called</li>
  <li>I tried to send the event when the app goes to the background on pressing the back button, but this does not really solve the problem because I cannot track when the application goes to the background on pressing the home button.</li>
  </ol>