Android - keeping the activity alive
<p>I have a puzzling problem. If I deploy my application from Eclipse on any device/emulator, I can use the Back and Home buttons to minimize it and then I can click the launcher icon to resume it. </p>

<p>If I take the apk, put it on the phone and install it (using the Astro file manager), then press Back or Home, when I click the launcher icon again, my application will be recreated instead of resumed: the activity is not destroyed.</p>

<p>This goes against everything written about on the android developer website regarding activities and their lifecycle. </p>

<p>For instance, this is what I do when the user uses the Back button: </p>

<pre><code>@Override
public void onBackPressed() {
    moveTaskToBack(true);
}
</code></pre>

<p>Yet my application is recreated when I click its launcher icon. Any ideas?</p>
