I am developing an Android application with number of activities. My MainActivity (Starting activity) has code to fetch updated data from server. I want to fetch updated data from server every time user launch application (1st launch or move application in foreground). 1st launch is fine i fetch data. But when user is on some other activity and minimize my app and open again it starts from last state. At this point how can i detect application is starting again so that i can fetch data again.
I have already checked onResume(), onPause() methods but they belong to individual activities. I want to catch event on application level, as we normally do in iOS applications.