Tuesday, July 5, 2011

[android-developers] Re: Multiple tasks within application

Mobile devices are quite personal and rarely shared between different
people. How many times did you lend your mobile device to someone
else? Are you sure you want to support multiple users on the same
device for the same application? Does it mean that you want to support
many users for an application on the same device and at the same time?
What is the use case?

----------
Ali Chousein
Geo-Filtered Assistant
http://geo-filtered-assistant.blogspot.com/


On Jul 5, 6:02 pm, Roman Mazur <mazur.ro...@gmail.com> wrote:
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment