ShortcutManagerCompat

public class ShortcutManagerCompat


Helper for accessing features in android.content.pm.ShortcutManager.

Summary

Constants

static final String

Key to get the shortcut ID from extras of a share intent.

static final int

Include cached shortcuts in the result.

static final int

Include dynamic shortcuts in the result.

static final int

Include manifest shortcuts in the result.

static final int

Include pinned shortcuts in the result.

Public constructors

Public methods

static boolean
addDynamicShortcuts(
    @NonNull Context context,
    @NonNull List<ShortcutInfoCompat> shortcutInfoList
)

Publish the list of dynamic shortcuts.

static @NonNull Intent

Returns an Intent which can be used by the launcher to pin shortcut.

static void
disableShortcuts(
    @NonNull Context context,
    @NonNull List<String> shortcutIds,
    @Nullable CharSequence disabledMessage
)

Disable pinned shortcuts, showing the user a custom error message when they try to select the disabled shortcuts.

static void
enableShortcuts(
    @NonNull Context context,
    @NonNull List<ShortcutInfoCompat> shortcutInfoList
)

Re-enable pinned shortcuts that were previously disabled.

static @NonNull List<ShortcutInfoCompat>

Return all dynamic shortcuts from the caller app.

static int