Call onDestroy() with menu button but not with back button on closing app in android?
<p>I want that when i close app with back button on device then my thread should </p>

<ol>
<li>send data to server.  </li>
<li>update GPS (lat,long) and get notification(on specific place) means do not call
onDestroy() but when i close app with menu button on device then app should totally
closed and stop all background updation.(means should call onDestroy()).</li>
</ol>

<p>Please help me ,i am new to android.</p>
