I made an exceedingly simple app consisting of a launch activity (.TestActivity) with nothing more than a button on it, and a 2nd activity (.second) with nothing more than a piece of text on it.
Then I create an .apk file from it and sideload it to my phone, I open the app, click the button and go to the 2nd activity, press Home to make the app leave the screen, and then press the icon of the app to open it again, it resumes on my FIRST activity and not the 2nd one that I would expect.
After I force close the app it works properly, though! Where is the problem here? It's not my phone because I've seen this on several other devices that I've tested with. It's not necessarily Eclipse because it works as expected on Eclipse (and the emulator), it's possibly the manner in which I package the .apk file (but even then it's a pretty standard "export" that I'm doing from Eclipse so I'm not sure what that would be). Any other ideas?
Here's the manifest:
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:label="@string/app_name"
android:name=".TestActivity" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:label="@string/app_name"
android:name=".second" >
</activity>
</application>
Why would force closing the app make it work how I want it to work the 2nd time, though?