There are four types of Android activity startup modes: Standard(default), Singletop, singletask,singleinstance mode .
The following are the differences between the four types of activity:
Let's assume that two activity:a and B,a have been started (all activity launches are in the task stack).
1:standard
All activity shares a task stack, creating an instance of the activity directly at the top of the task stack, with each activity initiated, without any detection.
2:singletop
All activity also shares a task stack, but when the activity is started, it detects whether the instance of the activity is on top of the stack, does not create an instance of the activity at the top of the task stack, or is not created, stack does not change.
3:singletask
activity If the instance already exists in the stack, it will activity, will be out of the stack, otherwise create the activity instance placed on top of the stack .
3:singleinstance
Each activity There is only one instance, and it is in a different stack, that is, in a separate stack.
Android Activity Startup mode