ShortCut Icon Not working On Ice Cream sandwich 4.0 But works fine on SDK < 14 
<p>Shortcut icon created is working fine except in Android 4.0
when clicking on the shortcut it is showing </p>

<blockquote>
  <p>THE APP ISN'T INSTALLED</p>
</blockquote>

<p>here is my code</p>

<pre><code>public class shortcutlauncher extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    final Intent shortcutIntent = new Intent();

    shortcutIntent.setClassName("com.test", ".loginactivity");

    shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
    final Intent intent = new Intent();
    intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
    // Sets the custom shortcut's title
    intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, "APP NAME");
    // Set the custom shortcut icon
    intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE,
            Intent.ShortcutIconResource.fromContext(this, R.drawable.icon));
    // add the shortcut
    intent.setAction("com.android.launcher.action.INSTALL_SHORTCUT");
    sendBroadcast(intent);
    finish();
}
</code></pre>

<p>}</p>

<p>And then declared activity in Manifest</p>

<pre><code>&lt;activity
        android:name=".shortcutlauncher" 
        android:taskAffinity="" android:screenOrientation="portrait" &gt;
        &lt;intent-filter &gt;
            &lt;action android:name="com.test.shortcutlauncher" /&gt;

            &lt;category android:name="android.intent.category.DEFAULT" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;
</code></pre>
