The problem I'm trying to solve is how to support a number of separate
back stacks and switch between them.
It's caused by the need to support multiple users of application (and
device) and to store the state for everyone.

There was the next implementation attempt.
When a new task is required for a user, an appropriate activity is
started with flags
Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_MULTIPLE_TASK |
Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS.
Such an activity intent has an action value unique for a particular
user (contains user's ID).
Then we can determine whether a task for some user exists checking
recent applications info from ActivityManager. In such case an
activity is started by an intent without FLAG_ACTIVITY_MULTIPLE_TASK.

This intent is hoped to bring an appropriate task to front. But
instead we have a new activity instance (described by the intent) in
the current task. There is no switching between tasks :(
What is the reason of such behavior? Task affinities?

PS. I saw moveTaskToFront method in ActivityManager but it's available
for API 11 level only. I have to support the 7th level.

Thanks in advance.

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