How to get the onResume of Application?
<p>My application has 3 activities-Main menu, sub menu, detail. Every time the <strong>APPLICATION</strong> resumes, I want to get some intimation so that I can start downloading some files. </p>

<p>Right now what i am doing is- on each activity <code>onResume</code>, i check if downloading is already going on or not. If it isn't then i start downloading. This way, whenever i start next/previous activity, if the downloading is not going on, it starts downloading. Meaning, once downloading was completed, user navigates to next page, downloading started again. </p>

<p>I want to prevent this behaviour otherwise there will be unnecessary internet usage.</p>

<p>If i maintain a global (application level) variable which keeps a track of download state, even after i resume the application, the  value is not re-set.</p>

<p>Any suggestion as to how to get the <code>onResume</code> of application.</p>
