title: Android: How to Remove/Uninstall application shortcuts from Home Screen?
body: <p>I have been trying to (ADD and then) REMOVE my APP's shortcut from HOME-SCREEN.
  ADDING a shortcut works perfectly however I'm not able to remove the shortcut I've created using below code.</p>
  
  <pre><code>public void setupShortCut(boolean create) {
          shortcutIntent = new Intent();
          shortcutIntent.setClassName("com.abc.xyz", "XYZActivity");
          shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
          shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
  
          icon = Intent.ShortcutIconResource.fromContext(this, R.drawable.icon);
  
          Intent intentShortcut = new Intent();
          intentShortcut.putExtra("android.intent.extra.shortcut.INTENT", shortcutIntent);
          intentShortcut.putExtra("android.intent.extra.shortcut.NAME", getResources().getString(R.string.app_name));
          intentShortcut.putExtra("android.intent.extra.shortcut.ICON_RESOURCE", icon);
          if(create) {
            intentShortcut.setAction("com.android.launcher.action.INSTALL_SHORTCUT");
          } else {
          intentShortcut.setAction("com.android.launcher.action.UNINSTALL_SHORTCUT");
          }
          sendBroadcast(intentShortcut);
      }
  </code></pre>
  
  <p>Please suggest where am I going wrong?</p>
  
  <p><strong>EDIT 1:</strong></p>
  
  <p>I have required permission in my Manifest file:</p>
  
  <pre><code>&lt;uses-permission android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT" /
  </code></pre>