// If the intent is a request to create a shortcut, we'll do that and exit
if (Intent.ACTION_CREATE_SHORTCUT.equals(action)) { setupShortcut(); finish(); return; } } privatevoidsetupShortcut() { // First, set up the shortcut intent. For this example, we simply create an intent that // will bring us directly back to this activity. A more typical implementation would use a // data Uri in order to display a more specific result, or a custom action in order to // launch a specific operation.