onStop not being called ... Home button pressed
<p>In my main activity, under onStop, I set myVar = true. In onResume, I check if myVar = true and do something.</p>

<p>If you hit the home button while on my main activity and launch it again from the home screen/app drawer, it works correctly.</p>

<p>If you hit the home button while on a different activity and launch it again from the home screen/app drawer, it brings up the main activity as I have clearTaskOnLaunch="true" set on my main activity and android:finishOnTaskLaunch="true" set on my other activities. However, it doesn't appear that it hit onStop in the main activity when the Home button was pressed.</p>

<p>I start the other activities for result. If result code = result_ok or result_canceled, I set myVar = false. But... if the home button is pressed, it shouldn't be setting results and doing the onActivityResult.</p>

<p>Any idea how to solve this?</p>

<p>Edit:</p>

<pre><code>above onCreate.. I set startNew = true;
@Override
    public void onStop() {
        super.onStop();
        startNew = true;
    }

    @Override
    public void onRestart() {
        super.onRestart();
        if (startNew) {
            getCurrentDate(0);
            updateDisplay();
            fillData();
        }
    }
</code></pre>

<p>The only other reference to startNew, is in my onActivityResult method, if an activity that was launched from my main activity returns either result_ok or result_canceled, I set startNew = false.</p>

<p>I'm trying to ensure that every time my app is launched from home screen / app drawer, that it runs those 3 methods.</p>
