Android: restore previous application to foreground -
at times launch 1 of app's activities, either using intentfilter or service etc. once user has done needs in app's activity time being, want app resume whichever app/activity user in prior service bringing app foreground.
the way can think of doing per this previous question, determine foreground app's package name before bringing app/activity foreground. then, when want resume app foreground, launch application given package name, as per question.
but there problems: firstly needs get_tasks permission. secondly, need determine foreground application before activity launches. handy determine previous app/activity after mine launched (or better yet, restore without having know it)
are there alternatives method above?
you can finish application , know android os resume previous opened application.
also @ question how bring activity foreground (top of stack)? maybe you.
Comments
Post a Comment