<!-- If your shortcut is associated with multiple intents, include them
here. The last intent in the list determines what the user sees when they launch this shortcut. --> <categories android:name="android.shortcut.conversation" />
</shortcut>
<!-- Specify more shortcuts here. --> </shortcuts>
if (mShortcutManager.isRequestPinShortcutSupported()) {
// Assumes there's already a shortcut with the ID "my-shortcut".
// The shortcut must be enabled. ShortcutInfo pinShortcutInfo =
new ShortcutInfo.Builder(this, "my-shortcut")
.build(); // Create the PendingIntent object only if your app needs to be notified
// that the user allowed the shortcut to be pinned. Note that, if the // pinning operation fails, your app isn't notified. We assume here that the // app has implemented a method called createShortcutResultIntent() that // returns a broadcast intent. Intent pinnedShortcutCallbackIntent =
mShortcutManager.createShortcutResultIntent(pinShortcutInfo); // Configure the intent so that your app's broadcast receiver gets
// the callback successfully. PendingIntent successCallback = PendingIntent.getBroadcast(this, 0,