pinned

fun pinned(id: String, block: PinnedShortcutSpec.() -> Unit): Boolean

Asks the launcher to pin a shortcut via ShortcutManagerCompat.requestPinShortcut. On API 26+ the system shows a confirmation dialog; below API 26 the legacy launcher broadcast is used.

Set PinnedShortcutSpec.resultCallback to be notified once the user confirms the pin.

Return

true when the request was sent to the launcher, false when pinning is not supported on this device.