次の方法で共有


ControlsProviderService.RequestAddControl Method

Definition

Request SystemUI to prompt the user to add a control to favorites.

[Android.Runtime.Register("requestAddControl", "(Landroid/content/Context;Landroid/content/ComponentName;Landroid/service/controls/Control;)V", "", ApiSince=30)]
public static void RequestAddControl (Android.Content.Context context, Android.Content.ComponentName componentName, Android.Service.Controls.Control control);
[<Android.Runtime.Register("requestAddControl", "(Landroid/content/Context;Landroid/content/ComponentName;Landroid/service/controls/Control;)V", "", ApiSince=30)>]
static member RequestAddControl : Android.Content.Context * Android.Content.ComponentName * Android.Service.Controls.Control -> unit

Parameters

context
Context

A context

componentName
ComponentName

Component name of the ControlsProviderService

control
Control

A stateless control to show to the user

Attributes

Remarks

Request SystemUI to prompt the user to add a control to favorites. <br> SystemUI may not honor this request in some cases, for example if the requested Control is already a favorite, or the requesting package is not currently in the foreground.

Java documentation for android.service.controls.ControlsProviderService.requestAddControl(android.content.Context, android.content.ComponentName, android.service.controls.Control).

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.

Applies to