My latest idea was to use
updateAppWidgetState(context = context, definition = PreferencesGlanceStateDefinition, glanceId = glanceId) {
// ...
}
and
GlanceWidget().update(context = context, glanceId = glanceId)
but I don't have access to glanceId.
The background of the question is that I want to add the uid to the AppWidgetState as described in this question: How to get the AppWidgetId of a Compose Glance widget?
How can I get the glanceId (e.g. from the appWidgetId that I have access to in the Configure activity) or how else would I achieve this?