Reading the documentation for Android , and some of the answers here will leave it ambiguous, how clearTaskOnLaunch should work. Specifically
1) How is root activity determined? Is it easy with DEFAULT, LAUNCHER or MAIN filters?
2) Starting from the “home screen” in the documentation means the OS initial screen or a list of applications, right? That is, from not inside the application.
3) Does clearTaskOnLaunch clear the activity stack whenever this activity starts from the main screen or only when this activity process starts from the main screen? Because the documents point to the former, but the messages here point to the latter. I think it depends on what the definition of "launch" is.
EDIT: 4) Does clearing the activity stack literally erase it or loop through onCreate () and finish ()?
I manipulated clearTaskOnLaunch in all possible ways without any effects. I put it in my activity in the manifest, and then put it in EVERY activity to be sure, restarted my application after the process was completely destroyed, etc. My activity stack is simply not cleared.
Can anyone suggest a complete overview of how to implement clearTaskOnLaunch?
android android-activity android-manifest
Nathan fig
source share