title: Cordova app terminate event
body: <p>We want to be able to send a notification to the device when our app is terminated on user's device (not paused). </p>
  
  <p>On iOS this is when you double click the home button and swipe up on the app, and Android this happens then you press the Menu button and swipe the app to the right.</p>
  
  <p>In Cordova, there are the following <a href="https://cordova.apache.org/docs/en/latest/cordova/events/events.html" rel="nofollow noreferrer">events</a>:</p>
  
  <ul>
  <li>deviceready                  </li>
  <li>pause                    </li>
  <li>resume                   </li>
  <li>backbutton                   </li>
  <li>menubutton                   </li>
  <li>searchbutton                     </li>
  <li>startcallbutton                  </li>
  <li>endcallbutton                    </li>
  <li>volumedownbutton                     </li>
  <li>volumeupbutton                   </li>
  <li>activated</li>
  </ul>
  
  <p>None of these events will fire when the app is terminated. The closest event is <code>pause</code>, this is fired when the app is terminated, but also when the app is moved into the background, and there isn't a way to tell which one is happening. Plus any processes that need to happen will only happen when the app is un-paused later.</p>
  
  <p>My question is, how can my server know (or be notified) when you have terminated the app, in a reliable way. In order for me to be able to send a push notification.</p>