Detect which event finishes activity
<p>How to detect the what event causes activity finish/onstop called.In the case of back button pressed,home key pressed,user navigates from notification bar.How can i detect these three cases when the activity is called stop.</p>
