I'm trying to solve a problem that occurs only when launching my app
from the Market's post-installation screen.  Suppose I have 3
activities which are accessed in order: A -> B -> C.

Normally, when a user uses my app (by launching from the home screen
or app drawer), if she hits the home button while in C, and then
launches my app again, then she gets taken back to C (with A and B in
the stack).  Basically, the activity stack is as she left it. (I do
have android:alwaysRetainTaskState="true" in the root activity of my
manifest)

However, if she launches my app for the first time directly from the
Market post-installation screen, then the behavior above does not
happen.  Instead, if she presses the home button while in C, and then
launches my app again (from the app drawer or home screen), she gets
taken to A, and the stack is now A -> B-> C -> A.

At this point no matter what she does, whenever she launches my app
(from wherever), she always has to start from A (with an activity
stack that continues to expand with lots of A's).  The only way for
her to solve this is to go to the application settings and "force
stop" my app.  After that, if she launches my app from the app drawer
or home screen then things work as expected.

I thought this could be a problem specific to my app, but I tested
this with a variety of other apps in the Market and it seems to affect
them as well.  Here's a really simple example:
1. Install the Twitter app
2. Launch from the Market's post-installation screen.
3. Enter some stuff in the username field (but don't submit)
4. Press home button
5. Launch twitter from app drawer
6. Notice that the username field is blank
7. Press back button.  Notice that you get taken "back" to a login
form with the username field filled in.

That's just one random example, it seems all apps behave like this
when launched as described above.

Is there something I can do to prevent this behavior?  Thanks.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to