There are 4 modes of startup, namely:
1.standard (default)--standard
2.singleTop--Single Top
3.singleTask--Single task
4.singleInstance:---singleton--If the mainactivity instance is created in the task stack of application 1, if Application 2 also activates mainactivity, then no need to create, two apps to share the activity instance. (Single case)
This startup mode is special, it enables a new stack structure, places the acitvity in the new stack structure, and guarantees that no other activity instances will enter. The stack structure ID is displayed by This.gettaskid ().
The Android:launchmode attribute in Androidmanifest.xml configuration <activity> is one of the above four.
Activity_launchmode_singleinstance
Secondactivity and fourthactivity are singleinstance modes, others are standard mode.
Back:
Fifthactivity (5), thirdactivity (3)->firstaty (1)->fourthactivity (4), secondactivity (2)
Conclusion:
SingleInstance will create a new return stack on its own.
For the rest, see:
Http://www.cnblogs.com/fanchangfa/archive/2012/08/25/2657012.html
Application Scenarios:
http://blog.csdn.net/berber78/article/details/19628153
Http://www.tuicool.com/articles/iIf6BbV
Startup mode for Android activity