> Documentation index: https://developer.android.com/reference/llms.txt

# GlanceWearWidgetManager

Artifact: [androidx.glance.wear:wear](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt) [View Source](https://cs.android.com/search?q=file:androidx/glance/wear/GlanceWearWidgetManager.kt+class:androidx.glance.wear.GlanceWearWidgetManager) Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)


```
class GlanceWearWidgetManager
```

<br />

*** ** * ** ***

Manager for Glance Wear Widgets.

This is used to query the wear widgets currently active on the system.

## Summary

| ### Public constructors |
|---|
| `GlanceWearWidgetManager(context: Context)` Creates a new `GlanceWearWidgetManager`, providing an interface to check which tiles or widgets are currently present on the system surfaces. |

| ### Public functions |
|---|---|
| `suspend List<ActiveWearWidgetHandle>` | `fetchActiveWidgets()` Returns all currently active widgets instances associated with the calling package. |
| `suspend List<ActiveWearWidgetHandle>` | `fetchActiveWidgets(widget: KClass<GlanceWearWidget>)` Returns all currently active widgets instances associated with the specified `widget` class. |

## Public constructors

### GlanceWearWidgetManager

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
GlanceWearWidgetManager(context: Context)
```

Creates a new `GlanceWearWidgetManager`, providing an interface to check which tiles or widgets are currently present on the system surfaces.

This instance is designed for reuse and can be maintained as a singleton within your application.

| Parameters |
|---|---|
| `context: Context` | The application context. |

## Public functions

### fetchActiveWidgets

```
suspend fun fetchActiveWidgets(): List<ActiveWearWidgetHandle>
```

Returns all currently active widgets instances associated with the calling package.

A widget instance is active when it was added by the user to a widget surface.

**Legacy Behavior (Pre-API 34):** On SDKs prior to Android 14 (U), this method uses a best-effort approach to approximate platform behavior and may be incomplete. Results may omit pre-installed widgets, widgets not visited within the last 60 days, or all widgets if the user has cleared app data. Conversely, widgets removed via an app update may incorrectly persist as "active" for up to 60 days post-removal.

### fetchActiveWidgets

```
suspend fun fetchActiveWidgets(widget: KClass<GlanceWearWidget>): List<ActiveWearWidgetHandle>
```

Returns all currently active widgets instances associated with the specified `widget` class.

A widget instance is active when it was added by the user to a widget surface.

**Legacy Behavior (Pre-API 34):** On SDKs prior to Android 14 (U), this method uses a best-effort approach to approximate platform behavior and may be incomplete. Results may omit pre-installed widgets, widgets not visited within the last 60 days, or all widgets if the user has cleared app data. Conversely, widgets removed via an app update may incorrectly persist as "active" for up to 60 days post-removal.