StatusBarManager.RequestAddTileService 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.
Overloads
RequestAddTileService(ComponentName, ICharSequence, Icon, IExecutor, IConsumer) |
Request to the user to add a |
RequestAddTileService(ComponentName, String, Icon, IExecutor, IConsumer) |
Request to the user to add a |
RequestAddTileService(ComponentName, ICharSequence, Icon, IExecutor, IConsumer)
Request to the user to add a android.service.quicksettings.TileService
to the set of current QS tiles.
[Android.Runtime.Register("requestAddTileService", "(Landroid/content/ComponentName;Ljava/lang/CharSequence;Landroid/graphics/drawable/Icon;Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetRequestAddTileService_Landroid_content_ComponentName_Ljava_lang_CharSequence_Landroid_graphics_drawable_Icon_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler", ApiSince=33)]
public virtual void RequestAddTileService (Android.Content.ComponentName tileServiceComponentName, Java.Lang.ICharSequence tileLabel, Android.Graphics.Drawables.Icon icon, Java.Util.Concurrent.IExecutor resultExecutor, Java.Util.Functions.IConsumer resultCallback);
[<Android.Runtime.Register("requestAddTileService", "(Landroid/content/ComponentName;Ljava/lang/CharSequence;Landroid/graphics/drawable/Icon;Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetRequestAddTileService_Landroid_content_ComponentName_Ljava_lang_CharSequence_Landroid_graphics_drawable_Icon_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler", ApiSince=33)>]
abstract member RequestAddTileService : Android.Content.ComponentName * Java.Lang.ICharSequence * Android.Graphics.Drawables.Icon * Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit
override this.RequestAddTileService : Android.Content.ComponentName * Java.Lang.ICharSequence * Android.Graphics.Drawables.Icon * Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit
Parameters
- tileServiceComponentName
- ComponentName
ComponentName
of the
android.service.quicksettings.TileService
for the request.
- tileLabel
- ICharSequence
label of the tile to show to the user.
- icon
- Icon
icon to use in the tile shown to the user.
- resultExecutor
- IExecutor
an executor to run the callback on
- resultCallback
- IConsumer
callback to indicate the result of the request.
- Attributes
Remarks
Request to the user to add a android.service.quicksettings.TileService
to the set of current QS tiles.
Calling this will prompt the user to decide whether they want to add the shown android.service.quicksettings.TileService
to their current tiles. The user can deny the request and the system can stop processing requests for a given ComponentName
after a number of requests.
The request will show to the user information about the tile: <ul> <li>Application name</li> <li>Label for the tile</li> <li>Icon for the tile</li> </ul>
The user for which this will be added is determined from the Context
used to retrieve this service, and must match the current user. The requesting application must be in the foreground (ActivityManager.RunningAppProcessInfo#IMPORTANCE_FOREGROUND
and the android.service.quicksettings.TileService
must be exported.
Note: the system can choose to auto-deny a request if the user has denied that specific request (user, ComponentName) enough times before.
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
RequestAddTileService(ComponentName, String, Icon, IExecutor, IConsumer)
Request to the user to add a android.service.quicksettings.TileService
to the set of current QS tiles.
public void RequestAddTileService (Android.Content.ComponentName tileServiceComponentName, string tileLabel, Android.Graphics.Drawables.Icon icon, Java.Util.Concurrent.IExecutor resultExecutor, Java.Util.Functions.IConsumer resultCallback);
member this.RequestAddTileService : Android.Content.ComponentName * string * Android.Graphics.Drawables.Icon * Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit
Parameters
- tileServiceComponentName
- ComponentName
ComponentName
of the
android.service.quicksettings.TileService
for the request.
- tileLabel
- String
label of the tile to show to the user.
- icon
- Icon
icon to use in the tile shown to the user.
- resultExecutor
- IExecutor
an executor to run the callback on
- resultCallback
- IConsumer
callback to indicate the result of the request.
Remarks
Request to the user to add a android.service.quicksettings.TileService
to the set of current QS tiles.
Calling this will prompt the user to decide whether they want to add the shown android.service.quicksettings.TileService
to their current tiles. The user can deny the request and the system can stop processing requests for a given ComponentName
after a number of requests.
The request will show to the user information about the tile: <ul> <li>Application name</li> <li>Label for the tile</li> <li>Icon for the tile</li> </ul>
The user for which this will be added is determined from the Context
used to retrieve this service, and must match the current user. The requesting application must be in the foreground (ActivityManager.RunningAppProcessInfo#IMPORTANCE_FOREGROUND
and the android.service.quicksettings.TileService
must be exported.
Note: the system can choose to auto-deny a request if the user has denied that specific request (user, ComponentName) enough times before.
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.