title: Understanding which Activity starts first in an Android app
body: <p>It isn't clear to me how Android determines which Activity starts first when an app starts. The Android documentation states the following concerning the AndroidManifest.xml file about <a href="http://developer.android.com/guide/topics/fundamentals/activities.html" rel="noreferrer">Activities</a>:</p>
  
  <p>"Only one activity should have the "main" action and "launcher" category..."</p>
  
  <p>So in the AndroidManifest.xml file, you should essentially have only one:</p>
  
  <p>action android:name="android.intent.action.MAIN"</p>
  
  <p>category android:name="android.intent.category.DEFAULT"</p>
  
  <p>However, while looking at sample code from the Android SDK, the application called "APIDemos" contains a manifest file with tons of</p>
  
  <p>"android.intent.action.MAIN" and
  "android.intent.category.DEFAULT"</p>
  
  <p>I am totally confused. This seems to go contrary to what Google is stating about there only suppose to be one. Does Android simply grab whichever one appears first in the manifest and ignores all the others? If not, why are there multiple MAINs and DEFAULTs?</p>