title: How to create a shortcut which only Toast something when I touched it
body: <p>I want to create a shortcut in Android, and when I touch it, it will only do something silently such as <code>Toast</code> something. But I found that it will display the main <code>Activity</code>. How could I get it to run silently?</p>
  
  <p>Just like the <em>AdvancedTaskManager</em>'s shortcut~Click and then <code>Toast</code>.</p>
  
  <p>Thanks.</p>
  
  <p>At the moment, I've got:</p>
  
  <pre><code>public class ShortcutOnclickActivity extends Activity {
      private static final String tag = ShortcutOnclickActivity.class
                                                              .getSimpleName();
      public static final String ACTION_SHORTCUT_CLICKED = ShortcutOnclickActivity.class.getName();
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          Toast.makeText(this, "Clicked", Toast.LENGTH_SHORT).show();
          Log.d(tag, "Clicked!");
          finish();
          super.onCreate(savedInstanceState);
          return;
      }   
  }
  
  &lt;!-- Shortcut --&gt;
  &lt;activity android:name=".ShortcutActivity"
          android:screenOrientation="portrait"&gt;
  &lt;/activity&gt;
  &lt;activity-alias android:name="CreateShortcutActivity"
          android:targetActivity=".ShortcutActivity"&gt;
      &lt;intent-filter&gt;
          &lt;action android:name="android.intent.action.CREATE_SHORTCUT" /&gt;
          &lt;category android:name="android.intent.category.DEFAULT"&gt;
          &lt;/category&gt;
      &lt;/intent-filter&gt;
  &lt;/activity-alias&gt;
  &lt;activity android:name=".ShortcutOnclickActivity"
          android:screenOrientation="portrait"&gt;
      &lt;intent-filter&gt;
          &lt;action android:name="com.androidesk.ShortcutOnclickActivity" /&gt;
          &lt;category android:name="android.intent.category.DEFAULT"&gt;
          &lt;/category&gt;
      &lt;/intent-filter&gt;
  &lt;/activity&gt;
  </code></pre>