ShortcutInfoCompat.Builder

public static class ShortcutInfoCompat.Builder
extends Object

java.lang.Object
   ↳ androidx.core.content.pm.ShortcutInfoCompat.Builder


Builder class for ShortcutInfoCompat objects.

Summary

Public constructors

Builder(Context context, String id)

Public methods

ShortcutInfoCompat.Builder addCapabilityBinding(String capability)

Associates a shortcut with a capability without any parameters.

ShortcutInfoCompat.Builder addCapabilityBinding(String capability, String parameter, List<String> parameterValues)

Associates a shortcut with a capability, and a parameter of that capability.

ShortcutInfoCompat build()

Creates a ShortcutInfoCompat instance.

ShortcutInfoCompat.Builder setActivity(ComponentName activity)

Sets the target activity.

ShortcutInfoCompat.Builder setAlwaysBadged()

Badges the icon before passing it over to the Launcher.

ShortcutInfoCompat.Builder setCategories(Set<String> categories)

Sets categories for a shortcut.

ShortcutInfoCompat.Builder setDisabledMessage(CharSequence disabledMessage)

Sets the message that should be shown when the user attempts to start a shortcut that is disabled.

ShortcutInfoCompat.Builder setExcludedSurfaces(int surfaces)

Sets which surfaces a shortcut will be excluded from.

ShortcutInfoCompat.Builder setExtras(PersistableBundle extras)

Extras that the app can set for any purpose.

ShortcutInfoCompat.Builder setIcon(IconCompat icon)

Sets an icon of a shortcut.

ShortcutInfoCompat.Builder