This Activity actually handles two stages of a launcher shortcut's life cycle.
1. Your application offers to provide shortcuts to the launcher. When
the user installs a shortcut, an activity within your application
generates the actual shortcut and returns it to the launcher, where it
is shown to the user as an icon.
2. Any time the user clicks on an installed shortcut, an intent is sent.
Typically this would then be handled as necessary by an activity within
We handle stage 1 (creating a shortcut) by simply sending back the information (in the form
android.content.Intent that the launcher will use to create the shortcut.
You can also implement this in an interactive way, by having your activity actually present
UI for the user to select the specific nature of the shortcut, such as a contact, picture, URL,
media item, or action.
We handle stage 2 (responding to a shortcut) in this sample by simply displaying the contents
of the incoming
In a real application, you would probably use the shortcut intent to display specific content
or start a particular operation.