title: How to handle running service when app is killed by swiping in android?
body: <p>If my app is running and i press home button, the app goes in background. Now if I long press the home button and kill the app by swiping it from the recent app list, none of the events like <code>onPause()</code>, <code>onStop()</code> or <code>onDestroy()</code> gets called rather the process is terminated. So if i want my services to stop, kill notifications and unregister listeners, how can i do that? I read quite a few articles and blogs but didn't get any useful information and I haven't found any documentation about it.
  Any help would be appreciated.
  Thanks in advance.</p>