Re: [android-developers] Re: How to detect when user switches Tasks (stack of Activities)?

2010-08-05 Thread Dianne Hackborn
That is not a robust design. For example: - you have activity A and activity B on top of it - the user leaves your app - your process gets killed - the user now switches back to your app. - a new activity B is created to show the user in their last state. At this point there is no activity A ins

Re: [android-developers] Re: How to detect when user switches Tasks (stack of Activities)?

2010-08-05 Thread TreKing
On Thu, Aug 5, 2010 at 11:27 AM, Jin Chiu wrote: > The problem with simpling setting a flag when launching a new activity is > the RootActivity still cannot tell when the entire task get switched, since > onStop() is only called once. > Told you it would break =P I don't think I'm getting your

[android-developers] Re: How to detect when user switches Tasks (stack of Activities)?

2010-08-05 Thread Jin Chiu
My root Activity maintains an AIDL connection to a Service. Depending on operations it receive from the Service, it will issue commands to children Activities that were spawned in the foreground. When the entire Activity stack goes into the background, the root Activity must be able to notify the S