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

# WidgetInstanceInfo

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


```
class WidgetInstanceInfo
```

<br />

*** ** * ** ***

Information representing an active placed widget instance across host display surfaces.

Each widget definition is identified by `widgetName` (shared across all instances of a `GlanceAdaptiveWidgetReceiver`, e.g. `"weather_forecast"`), while `widgetId` identifies the logical widget instance configuration (either a developer-defined custom tag, e.g. `"bucharest_weather"`, or an auto-generated UUID).

Multiple placements on the same surface or across different host surfaces (e.g. two placements on the home screen, or one on the home screen and one on the lock screen) can share the same `widgetId`. `placementsPerSurface` maps each active `GlanceSurface` to the number of placements currently showing this `widgetId` on that surface.

## Summary

| ### Public constructors |
|---|
| `WidgetInstanceInfo( widgetName: String, widgetId: String, options: Bundle, placementsPerSurface: ObjectIntMap<GlanceSurface> )` |

| ### Public functions |
|---|---|
| `open operator Boolean` | `equals(other: Any?)` |
| `open Int` | `hashCode()` |
| `open String` | `toString()` |

| ### Public properties |
|---|---|
| `Bundle` | `options` User configuration options and metadata stored for this widget instance. |
| `ObjectIntMap<GlanceSurface>` | `placementsPerSurface` Map of host `GlanceSurface` to active placement count. |
| `String` | `widgetId` Identifier for this logical widget instance, which may be shared across multiple placements. |
| `String` | `widgetName` Identifier of the widget definition. |

## Public constructors

### WidgetInstanceInfo

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

```
WidgetInstanceInfo(
    widgetName: String,
    widgetId: String,
    options: Bundle = Bundle(),
    placementsPerSurface: ObjectIntMap<GlanceSurface> = emptyObjectIntMap()
)
```

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### toString

```
open fun toString(): String
```

## Public properties

### options

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

```
val options: Bundle
```

User configuration options and metadata stored for this widget instance.

### placementsPerSurface

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

```
val placementsPerSurface: ObjectIntMap<GlanceSurface>
```

Map of host `GlanceSurface` to active placement count.

### widgetId

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

```
val widgetId: String
```

Identifier for this logical widget instance, which may be shared across multiple placements.

### widgetName

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

```
val widgetName: String
```

Identifier of the widget definition.