TileService.RequestListeningState(Context, ComponentName) Method

Definition

Requests that a tile be put in the listening state so it can send an update.

[Android.Runtime.Register("requestListeningState", "(Landroid/content/Context;Landroid/content/ComponentName;)V", "", ApiSince=24)]
public static void RequestListeningState (Android.Content.Context? context, Android.Content.ComponentName? component);
[<Android.Runtime.Register("requestListeningState", "(Landroid/content/Context;Landroid/content/ComponentName;)V", "", ApiSince=24)>]
static member RequestListeningState : Android.Content.Context * Android.Content.ComponentName -> unit

Parameters

context
Context
component
ComponentName
Attributes

Remarks

Requests that a tile be put in the listening state so it can send an update.

This method is only applicable to tiles that have #META_DATA_ACTIVE_TILE defined as true on their TileService Manifest declaration, and will do nothing otherwise.

For apps targeting Build.VERSION_CODES#TIRAMISU or later, this call may throw the following exceptions if the request is not valid: <ul> <li> NullPointerException if component is null.</li> <li> SecurityException if the package of component does not match the calling package or if the calling user cannot act on behalf of the user from the context.</li> <li> IllegalArgumentException if the user of the context is not the current user. Only thrown for apps targeting Build.VERSION_CODES#TIRAMISU</li> </ul>

Java documentation for android.service.quicksettings.TileService.requestListeningState(android.content.Context, android.content.ComponentName).

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