onResume called to early when returning from Settings screen
<p>In my app I check if gps is enabled. If not, I send the user to the Settings screen to enable gps. </p>

<p>In my onResume function, I'm requesting information from a server, which is a bit time consuming, and then goes to my next Activity. I'd prefer the user to be stuck at my screen while the information is retrieved. Instead, what I see is the app sits at the Settings screen frozen while the information is gathered, and then goes directly to my next Activity.</p>

<pre><code> protected void onResume() {
        if(gpsIsOn()) {
            obtainLocationStuff();
            startActivity(new Intent(splashActivity.this, mainActivity.class));
        } else {
          launchCloseDialog();
        }

    super.onResume();
}
</code></pre>

<p>How can I get onResume to be launched when the user is actually returned to my app? </p>
