title: Android: Homescreen shortcut to certain action within an app
body: <p>In an android app I am making, I want to allow users to place shortcuts on their homescreen that will make my app perform certain actions. So far, I made it successfully create the shortcut (they are created through the launcher, not through the app directly). However, when I click on them, it says </p>
  
  <blockquote>
    <p>Application isn't installed on your phone</p>
  </blockquote>
  
  <p>Which I assume means I have created the shortcut wrong. The code I am using to create the shortcut is:</p>
  
  <pre><code>Intent shortcutIntent = new Intent(ShortcutActivity.this, com.example.myapp.MyActivity.class);
  ShortcutIconResource iconResource = Intent.ShortcutIconResource.fromContext(ShortcutActivity.this, R.drawable.clean);
  Intent intent = new Intent();
  intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
  intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, shortcutName);
  intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, iconResource);
  setResult(RESULT_OK, intent);
  </code></pre>