addDynamicShortcuts

open fun addDynamicShortcuts(@NonNull context: Context, @NonNull shortcutInfoList: List<ShortcutInfoCompat>): Boolean(source)

Publish the list of dynamic shortcuts. If there are already dynamic or pinned shortcuts with the same IDs, each mutable shortcut is updated.

On API <= 31 Any shortcuts that are marked as excluded from launcher will not be passed to the ShortcutManager, but they might still be available to assistant and other surfaces through alternative means.

This API will be rate-limited.

Return

true if the call has succeeded. false if the call fails or is rate-limited.

Throws

if getMaxShortcutCountPerActivity is exceeded, or when trying to update immutable shortcuts.