Ah I'm in the position where this code is out there, changing it so drastically would be risky. It looks like there's just no way to resume an already running instance, this doesn't seem right. I thought this should be possible:
App Tray ActivityA (singleTask) ActivityB (singleTop) Browser launch ActivityA ActivityA already-running-task is resumed ActivityA::newIntent(ClearTop | SingleTop, ActivityB.class) shouldn't ActivityA just be able to wipe out the already-running instance of B? I see the same instance of A is resumed by memory address, so I am assuming its activity stack is also intact. But the original instance of B somehow gets lost in limbo in the above scenario, I never see ActivityB::onPause::isFinishing(). Thanks On Feb 17, 7:18 am, Mark Murphy <[email protected]> wrote: > Mark Wyszomierski wrote: > > Yeah the problem is that my activity uses a singleton, and if there > > are multiple instances of the activity, they can conflict with each > > other if they are all trying to use the singleton simultaneously: > > > TaskA: > > ActivityB .. singleton.runLongProcess(...); > > > Browser: > > Click link, launch new instance of ActivityB > > ActivityB ..singleton.runLongProcess(...); > > Instead of a pure singleton, use an IntentService or something else that > queues the "long process" jobs. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android Training in US: 14-18 June 2010:http://bignerdranch.com -- 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

