ControlsProviderService.PerformControlAction Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The user has interacted with a Control.
[Android.Runtime.Register("performControlAction", "(Ljava/lang/String;Landroid/service/controls/actions/ControlAction;Ljava/util/function/Consumer;)V", "GetPerformControlAction_Ljava_lang_String_Landroid_service_controls_actions_ControlAction_Ljava_util_function_Consumer_Handler", ApiSince=30)]
public abstract void PerformControlAction (string controlId, Android.Service.Controls.Actions.ControlAction action, Java.Util.Functions.IConsumer consumer);
[<Android.Runtime.Register("performControlAction", "(Ljava/lang/String;Landroid/service/controls/actions/ControlAction;Ljava/util/function/Consumer;)V", "GetPerformControlAction_Ljava_lang_String_Landroid_service_controls_actions_ControlAction_Ljava_util_function_Consumer_Handler", ApiSince=30)>]
abstract member PerformControlAction : string * Android.Service.Controls.Actions.ControlAction * Java.Util.Functions.IConsumer -> unit
Parameters
- controlId
- String
- action
- ControlAction
- consumer
- IConsumer
- Attributes
Remarks
The user has interacted with a Control. The action is dictated by the type of ControlAction
that was sent. A response can be sent via Consumer#accept
, with the Integer argument being one of the provided ControlAction.ResponseResult
. The Integer should indicate whether the action was received successfully, or if additional prompts should be presented to the user. Any visual control updates should be sent via the Publisher.
By default, all invocations of this method will require the device be unlocked. This can be modified per Control by Control.StatefulBuilder#setAuthRequired
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.