4

Imagine an app where Activity A is the default Activity and has launchMode="singleTask". The app opens to Activity A. The user navigates through the app and at some point navigates to Activity A again (by moving forward, not pressing back). According to the Android docs, because launchMode="singleTask", this will happen:

The system creates the activity at the root of a new task and routes the intent to it. However, if an instance of the activity already exists, the system routes the intent to existing instance through a call to its onNewIntent() method, rather than creating a new one.

Activity A exists on the back stack, so it will receive a call to onNewIntent(). What I want to know is, what happens to the other Activities when Activity A is brought from the bottom of the back stack to the top?

Are they popped and destroyed or does something else happen? Are they even in the same stack?

Thanks in advance...

Barry Fruitman
  • 12,316
  • 13
  • 72
  • 135
  • hi have you seen the answer, if yes and feasible to you than issue will be closed and we will move to next question after solving. :) – Jitesh Upadhyay Jan 10 '14 at 03:50

1 Answers1

0

From the Android docs: http://developer.android.com/images/fundamentals/diagram_backstack_singletask_multiactivity.png

A representation of how an activity with launch mode "singleTask" is added to the back stack. If the activity is already a part of a background task with its own back stack, then the entire back stack also comes forward, on top of the current task.

user3903214
  • 203
  • 1
  • 9