Task is a stack of activities
Back button activity finished and popped off the stack
Apps running simultaneously in a multi windowed environment the system manages tasks separately for each window.
Home screen is the starting place for most tasks.
When current activity starts the new activity is pushed on the top of the stack and takes focus. previous remains but is stopped.
Back stack operates as a LIFO object structure
Task is a cohesive unit that can move to the “background” when users begin a new task or go to the Home screen via the Home button.
A task can then return to the “foreground” so users can puck up where they left off.
Activities can be instantiated multiple times even from other tasks
Defining launch modes with manifest file or Intent flags
<activity>
manifest element and with flags in the - intent that you pass to startActivity().<activity>
attributes can be used.
“standard”: default, can be instantiated multiple times, can belong to fidderent taks and one taks can have multiple instances
“singleTop”: instance os the activity already exists at the top of the current task the system routes the intent to that instance through a call to its onNewIntent() method
“singleTask”: creates new task and instantiates the activity at the root of the new task. If already exists in a separate task the system routes the intent to the existing instance through a call to its onNewIntent()
“singleInstance”: same as “singleTask” except the system doesn’t launch any other activities into the task holding the instance