Switch to the home (to the launcher)
<p>Now my problem :
I wrote a function to put an application in the foreground, it works fine for every applications, except for one: the launcher (com.android.launcher).</p>

<p>The function : </p>

<pre><code>public void switchTo(String activityName)
{
    Intent intent=new Intent(Intent.ACTION_MAIN);       
    try
    {   
        //Specials cases (Contacts and launcher app)
        if(activityName.equalsIgnoreCase("com.android.contacts"))
        {
            intent.setComponent(new ComponentName("com.android.contacts","com.android.contacts.DialtactsContactsEntryActivity" ));
        }
        else
        {
            intent=this.packageManager.getLaunchIntentForPackage(activityName);
        }

        if(null != intent)
        {
            intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
            this.activity.startActivity(intent);
            this.activity.finish();
        }

    }
    catch (ActivityNotFoundException e)
    {
        e.printStackTrace();
    }
}
</code></pre>

<p>When "activityName" is equal to "com.android.launcher", nothing happens, not even an exception, but the function is called (I verified with a "Log" function).</p>

<p>So do you have any idea of where the mistake is?</p>
