android - multiuser application managing back stack of each user -


everybody

i work on multiuser application, rest client, when launch it, 1st activity see loginactivity.

for example, have ten activities , loginactivity , can navigate e.g. next way: loginactivity -> activity1 -> activity3 -> activity8(logout) -> loginactivity. can log out every activity.

possible next situation:
1) user1 logged in: loginactivity -> activity1 -> .. activity7(logout) -> loginactivity.
2) user2 logged in: loginactivity -> activity1 -> .. activity4(logout) -> loginactivity.
3) user1 logging in again: loginactivity -> activity7.. , user1 must naturally go activity7 last stack if possible.

also user must see relevant him data.

is there mechanisms manage stuff? mean, android platform support such multiuser apps, or restoring/storing stack manually.

any other ideas?

p.s. found workaround use sharedprefences each user store his data , store activity logged in from. seems not android way me.

upd: done research, , found out 2 intent flags launch new task it`s stack history: (flag_activity_new_task | flag_activity_multiple_task)

so, understand, in case of above example loginactivity "top level launcher" mention in javadoc of flag_activity_multiple_task.

but, cannot find docs/sample of top level launcher; how manage tasks ids. please top level launcher sample or managing tasks api.

upd2: found how functions how manipulate tasks task id:
public void movetasktofront (int taskid, int flags);
since api level 11 use level 7, there technique how move task foreground?

there no way of managing tasks since "it isn't how tasks supposed work. whole point of them entirely separate, unrelated things" solved similar problem inspired in solution although. in solution, keep track of activities being used, suits idea, think. don't think using tab system, discard bottom part. important part activitygroup management.

i hope helps.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -