How to achieve one installed app, two launcher icons?
<p>I want to achieve the goal that after installing an application, two icons appear in the Launcher. Clicking on either one of them will launch the corresponding activity. With the XML and JAVA code at the bottom, everything seems to work fine, except one case:</p>

<p><strong>BUG:</strong><br/>
Step 1. Click icon 1 to start activity 1<br/>
Step 2. Click <strong>Home</strong> icon to swtich to Launcher<br/>
Step 3. From Launcher, click icon 2<br/>
Expected result: Activity 2 gets started.<br/>Actual result: Activity 1 gets resumed.</p>

<p>Notice that in step 2, if I click the <strong>Back</strong> button instead of the <strong>Home</strong> button to get back to he launcher, then step 3 would succeed. But if I used the Home button, then the bug happens. Could someone please tell me what did I mess? Much appreciate!</p>

<pre><code>&lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;
    &lt;activity 
        android:name=".TestActivity1"
        android:label="Test 1"&gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.MAIN" /&gt;
            &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;
    &lt;activity 
        android:name=".TestActivity2"
        android:label="Test 2"&gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.MAIN" /&gt;
            &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;
&lt;/application&gt;


// The first activity
public class TestActivity1 extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}


// The second activity, it uses a different content view
public class TestActivity2 extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main2);
    }
}
</code></pre>
