addCapabilityBinding

Associates a shortcut with a capability without any parameters. Used when the shortcut is an instance of a capability.

This method can be called multiple times to associate multiple capabilities with this shortcut.

Parameters

capability

capability associated with the shortcut. e.g. actions.intent .START_EXERCISE.


open fun addCapabilityBinding(@NonNull capability: String, @NonNull parameter: String, @NonNull parameterValues: List<String>): ShortcutInfoCompat.Builder(source)

Associates a shortcut with a capability, and a parameter of that capability. Used when the shortcut is an instance of a capability.

This method can be called multiple times to associate multiple capabilities with this shortcut, or add multiple parameters to the same capability.

Parameters

capability

capability associated with the shortcut. e.g. actions.intent .START_EXERCISE.

parameter

the parameter associated with the capability. e.g. exercise.name.

parameterValues

a list of values for that parameters. The first value will be the primary name, while the rest will be alternative names. If the values are empty, then the parameter will not be saved in the shortcut.