that situation seems a bit contrived. if the process is killed, then when it gets restarted, doesn't it start the activity from whatever I have set in my android manifest file? does it remember what the top most activity was when the process was killed?
tia. On Sep 17, 6:07 pm, Dianne Hackborn <[email protected]> wrote: > This will probably break if your process gets killed while in the > background. For example, run your app so it has some activities, press > home, use adb shell's "ps" to find your process and "kill" to kill it, then > select it again from home. You process will be restarted, with the top-most > activity started. None of the others will be running at this point. > > > > On Thu, Sep 17, 2009 at 5:55 PM, sdphil <[email protected]> wrote: > > > okay, what I wound up doing was to create a base class that all my > > activities derive from. then I keep track of the activities in a > > static variable. when a derived activity class calls "finishAll()" it > > iterates through the activites it knows about and calls "finish()" on > > them (except if it equals "this"). > > > Then the client calls "startActivity()" and then calls "finish()" > > > On Sep 17, 12:25 pm, Dianne Hackborn <[email protected]> wrote: > > > You can't directly replace the root. The only way I can think off-hand > > to > > > do this is to use CLEAR_TOP when starting the same activity component as > > > your current root to send an intent down to that root (and finish all of > > the > > > activities in-between, and then handle onNewIntent() there to see this > > > intent and start the new desired activity and finish itself. > > > > On Thu, Sep 17, 2009 at 11:27 AM, sdphil <[email protected]> > > wrote: > > > > > hi, i want to clear the activity stack and replace it with a new > > > > activity as the root activity, even if that activity exists somewhere > > > > on the stack (or not). > > > > > i see -- FLAG_ACTIVITY_CLEAR_TOP and FLAG_ACTIVITY_NEW_TASK, but > > > > it's not obvious to me how to use those in conjunction to achieve what > > > > I want. > > > > > it's like i want to completely restart the task with some activity > > > > that i specify as the new root. > > > > > tia. > > > > -- > > > Dianne Hackborn > > > Android framework engineer > > > [email protected] > > > > Note: please don't send private questions to me, as I don't have time to > > > provide private support, and so won't reply to such e-mails. All such > > > questions should be posted on public forums, where I and others can see > > and > > > answer them. > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

