title: Two main activities in AndroidManifest.xml
body: <p>I would like to have two main activities in my app.  So in my manifest I put:</p>
  
  <pre><code>&lt;activity
      android:name="mypackage1.MainActivity"
      android:label="@string/title_activity_main"&gt;
  
      &lt;intent-filter&gt;
          &lt;action android:name="android.intent.action.MAIN" /&gt;
  
          &lt;category android:name="android.intent.category.DEFAULT" /&gt;
          &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
      &lt;/intent-filter&gt;
  &lt;/activity&gt;
  
  &lt;activity
      android:name="mypackage2.MainActivity2"
      android:label="@string/title_activity_main2"&gt;
  
      &lt;intent-filter&gt;
          &lt;action android:name="android.intent.action.MAIN" /&gt;
  
          &lt;category android:name="android.intent.category.DEFAULT" /&gt;
          &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
      &lt;/intent-filter&gt;
  
  &lt;/activity&gt;
  </code></pre>
  
  <p>Two icons  are created in my apps menu. But when I click on each of them the first activity MainActivity is always  launched. Is it possible to have two main activities? If so, what's wrong with what I did?
  Thanks</p>