What are “launch modes”? What are the two mechanisms by which they can be defined? What are specific types of launch modes supported?
launch modes are generally referred to the ways in which an activity is executed. it basically provides instruction on how the activity is associated with the current ongoing task.
there are two important concepts which are to kept in mind -
task refers to the number of activity associated with the app when the user interacts with it. whenever a user starts an application a new task is created, this task is the root of the first activity instance.
when a user launches new activity these activities combined to form a set of tasks which placed on one another.
as soon as the startActivity() is called a new activity is created which are placed in a stack. when we end a current activity it moves back to the previous activity.
there are four types of launch modes -