title: What is the root activity in android?
body: <p><a href="https://developer.android.com/guide/topics/manifest/activity-element.html" rel="nofollow noreferrer">https://developer.android.com/guide/topics/manifest/activity-element.html</a></p>
  <blockquote>
  <h3>android:alwaysRetainTaskState</h3>
  <p>Whether or not the state of the task that the activity is in will always be maintained by the system — &quot;true&quot; if it will be, and &quot;false&quot; if the system is allowed to reset the task to its initial state in certain situations...<strong>This attribute is meaningful only for the root activity of a task</strong>; it's ignored for all other activities.</p>
  </blockquote>
  <p>So what does root activity mean exactly?</p>
  <p>Does root activity mean</p>
  <p>&quot;Activity that is defined with <code>android.intent.action.MAIN</code> and <code>android.intent.category.LAUNCHER</code>&quot;</p>
  <p>or just</p>
  <p>&quot;whatever activity that happens to be at the bottom of the back stack at this exact moment&quot;</p>