- Standard mode , a new instance is created each time an Activity is created
- Singletop Stack top multiplexing mode , if the instance already exists on the stack top of the task stack, then the Activity is not created and its on Newinte will be recalled .
- SIngle Task Stack mode , if the desired task stack does not exist , create a corresponding task stack, and then create the required instances to be merged into the stack, If the desired task stack exists, find the appropriate instance in the task stack, move the instance to the top of the stack if there is a corresponding instance, or create a corresponding instance to merge the stack
- SingleInstance Single Instance mode , the enhanced version of the singleton task , Activity with this attribute can only exist in the corresponding task stack alone
Taskaffinity Specifies the name of the task stack , by default , the package name for the app
1. Add Luanchermode to Activity set startup mode
2. Specify the activation mode of the Activity by setting Flag to Intent
The first method cannot set the Flag_activty_clear_top identity directly to Activty , the second cannot set the singleinstance mode
Flag_activity_new_task : specifies that ACTIVITY's startup mode is singletask
Flag_activity_single_top: Specifies that ACTIVITY's startup mode is singletop
Flag_activity_clear_top: in case of Singletask, if the instance already exists , then onnewintent, if standard mode , then all the activity on top of it will be out of the stack , then create a new activity and put it into the task stack
Flag_activty_exclude_from_recents: activity with this tag does not appear in the History list of activity
matching rules for Intent
One
As long as there is a corresponding category, add Android by default . Intent.category.DEFAULT This category
Consists of two parts , mimeType and URI
the default value for the URI is content or file
<scheme>://
Activation mode of activity