Please stop saying I am "on the right track."  I am really trying very hard
to tell you *not* to do this, because it is not going to be a robust
solution.  Not this, not RunningTaskInfo.  These APIs are not there for
applications to base their UI flow on, but to do things like show the user
the running apps, or a task manager, or such.

Yes there is a list kept in memory for these things.  However, it is off in
another process, managed by threads running separately from yours, and not
something you can count on (a) seeing in time to make the correct decision
or (b) have a consistent picture by the time you return.  Plus the decision
about what the "next" activity to go to is always done at the point where
the switch is to happen, and it is not until that exact point (where the
activity state is briefly locked down to do the switch) that we actually
know for such what the next thing will be.

And the implementation and global behavior here is not guaranteed to remain
the same in the future.

Have you thought about all of the possible flows through your app like this?
 The user pressing back, pressing home, long pressing home to return to the
task, bringing down a notification to temporarily look at it and then
pressing back to return to the task, etc.  The chances of you getting this
all right are really low.

On Tue, Aug 24, 2010 at 7:04 PM, Call_Waiting <[email protected]>wrote:

> killing the service = turning off my app
>
> But my app works, and I can turn it off from the activity.  I'm just
> need a check to see when to trigger it.
>
>
> I think Hackborn is on the right track with getRunningAppProcesses().
>
>
> The first time you start my app - input your settings, one of these is
> an app which you want to auto-start when you start my app.
> Any other time you never see my app, or the settings.  -   Unless you
> press back button, then you get back to my app's settings.
> When your in someone else's app, theirs not away to trigger when you
> have left that app.  So that's what we are trying to find, the
> trigger.
>
>
> If anyone has more info on some example about implementing
> getRunningAppProcesses().  It would be much appreciated.
>
>
>
>
> On Aug 24, 5:58 pm, Frank Weiss <[email protected]> wrote:
> > What does "turning off my app" mean?
>
> --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
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

Reply via email to