title: How to catch exit app event?
body: <p>Hy! I need to catch the exit app event in my phonegap application. Actually I want to trigger a looseLife() function if the player tries to cheat and exit the app with minimize and exit from task manager while he already started a new lvl. If he exit it correctly, by pressing the back button it works fine.</p>
  
  <p>I tried onunload or onbeforeunload but these functions get called only if I close the app normally, without minimizing it and closing it from task manager.</p>
  
  <p>The pause function also doesn't help me because it gets triggered also if the screen is locked or when the user switches to another app and than back again.</p>
  
  <p>How to catch the event when the app is minimized and closed in the task manager?</p>