How to identify Activity is launched from background
<p>I am facing problem to find how to call a user defined method(Else simply Log a message) when the app becomes active that is comes to foreground from background, i.e. if user pressed home button the app goes to background when the app comes to foreground again I want to display an alert box .Can some body please tell me how to perform this check whether app has come to foreground  or provide some links .I don't understand what to search for. Some sites referred me to override <code>OnResume()</code>. However, this method is called every time my activity is launched from one activity to another even if i come back to this activity. I need this method to be called only when the user comes from background to foreground.</p>
