1. Standard mode
It is the default startup mode for the activity, which is automatically used by all activities without a display setting. Each time the activity is started by this mode, Android always launches a new instance for the target activity.
2. Singletop mode
It's a bit like standard mode, but it's different: In this mode, when the activity that is going to be started is already at the top of the task stack, the target activity instance is not recreated, but the existing activity instance is reused.
If the activity to be started is not at the top of the task stack, the system will recreate the instance of the target activity and load it on top of the task stack.
3. Singletask mode
Activity using this load mode has only one instance within the same task, which can be divided into three situations when the system launches activity using this singletask mode:
<1> if the activity that will be started does not exist, the target activity instance will be created and added to the top of the task stack.
<2> if the activity that will be started is already at the top of the task stack, this is the same behavior as the singletop mode.
<3> If the activity that is about to start already exists but is not at the top of the task stack, the system will move all activity above the activity out of the task stack, so that the target activity goes to the top of the stack.
4. SingleInstance mode
In this load mode, a target activity instance is created, regardless of the task from which it was started, and a new task stack is used to mount the activity instance. When the system uses SingleInstance mode to start activity, there are two situations:
<1> If the activity that is about to start does not exist, the system creates an entirely new task, creates an instance of the target activity, and adds it to the top of the new task's stack.
<2> If the activity that is about to start already exists, regardless of which application it is in, whatever task it is in, the system will take the activity's task to the foreground and use that activity to display it.
Tips: It should be noted that loading activity in singleinstance mode is always at the top of the task stack and loading the activity's task with SingleInstance mode contains only that activity.
Four startup modes for active (activity)