In short.
Glance AppWidget Updates and Memory is an assistant skill for Android developers maintaining home-screen widgets, but its examples leave data syncing and several integration details unfinished. Its useful patterns connect DataStore changes to explicit refreshes, reduce repeated bitmap allocations and move background work into WorkManager. The supplied worker only increments a revision counter, the classic receiver is not connected to its image-update helper, and the widget metadata omits a loading layout required by the bundled guide. Compilation, device behavior and actual memory savings are not assessed.
Researched and written by an AI model and checked by a second AI model. How it works
The scope comprises all 13 supplied files under system/glance-appwidget-updates-and-memory at revision c72942584fff970dac86ced78b367fce0c441e52, plus the repository-root LICENSE.txt. It includes the skill, Kotlin examples, Android configuration, R8 rule and bundled documentation. Other repository skills, external linked pages, assistant-host behavior and a complete consuming application are outside this scope. Installation, compilation, runtime correctness, memory compliance and performance are not assessed.
The overview
Identity
The resource is the glance-appwidget-updates-and-memory skill in the android/skills repository. SKILL.md identifies Google LLC as its author. It supplies instructions for a coding assistant, Kotlin examples and Android configuration files; it is not a standalone widget application.
The original folder at the supplied revision is available at [https://github.com/android/skills/tree/c72942584fff970dac86ced78b367fce0c441e52/system/glance-appwidget-updates-and-memory]. Its scope covers Jetpack Glance and classic AppWidgetProvider maintenance, while excluding in-app Compose screens and widget layout templates.
Assessment
The strongest fit is diagnosing widgets that retain old content, reject image updates, lose image access or fail when an action is tapped. The skill connects symptoms to concrete implementation patterns, including explicit refresh calls, image sampling, callback constructor rules and background scheduling.
The examples require adaptation before adoption. They demonstrate individual mechanisms without providing a complete data source, image acquisition path or working classic-widget refresh pipeline. Their usefulness as guidance is supported by the source; successful operation in a particular app is not established.
Users
It suits Kotlin Android developers adding or maintaining launcher widgets, especially widgets with photographs, thumbnail collections, multiple sizes or background refreshes. Developers preparing an app to target Android 17 are a particular audience.
Beginners need an existing Android project and familiarity with Gradle, manifests and Kotlin classes. The bundled guide explains that Glance uses Compose-style syntax with its own components and remains constrained by AppWidget and RemoteViews capabilities. Experienced developers get more specific guidance on bitmap identity, active-session caching, R8 and WorkManager.
Capabilities
The state examples pair updateAppWidgetState with an explicit widget update, schedule refresh work through a CoroutineWorker and use a public zero-argument ActionCallback. A companion R8 rule retains callback constructors.
The image examples estimate a memory budget, downsample local files, share a bitmap across responsive sizes and supply a text-only composition-error fallback. Additional files demonstrate revision-based thumbnail caching, FileProvider configuration and full RemoteViews image replacement for classic widgets. These are source examples, with runtime effectiveness not assessed.
Using it
Requirements
The skill declares a Kotlin Android project with minSdk at least 26, compileSdk 37, Compose enabled and the Compose compiler Gradle plugin. It names Glance 1.2.0, with 1.1.1+ described as the minimum, plus DataStore preferences-core 1.2.1 and WorkManager work-runtime-ktx 2.12.0 for the relevant examples.
These are the skill's stated requirements, not independently established compatibility results. It instructs developers to preserve existing package identifiers, AGP, Kotlin and library versions, and to change targetSdk to 37 only when explicitly migrating to Android 17. Supported assistant hosts and Android CLI installation requirements are not specified.
Mechanism
Saving widget preferences and refreshing the launcher are separate operations. The state helper enumerates SampleGlanceWidget instances, increments each stored revision and calls widget.update(context, glanceId). Reading that revision inside provideContent makes the displayed content depend on stored state.
The bitmap helper first probes image dimensions, then increases a power-of-two sampling factor to approach the widget's display dimensions and an estimated per-image budget. The estimated total bitmap budget is 6 × width × height bytes, using current window bounds where available and display metrics as a fallback. The per-image budget is that total divided by max(1, distinctImageCount). Sharing the same Bitmap instance across widget sizes is intended to avoid counting separate decoded copies.
The bundled Android 17 page states that oversized updates throw an IllegalArgumentException for apps targeting API 37 or higher, while lower targets receive a warning. The skill also warns that its current-window estimate can exceed a limit cached at boot after display changes; the helper does not read the actual system limit.
Setup
The bundled guides document the Android CLI command android skills add glance-appwidget-updates-and-memory. The complete original folder matters because SKILL.md links to companion code and configuration. Installation behavior is not assessed.
Integration requires adapting package and receiver names, declaring the widget receiver and metadata, adding the relevant dependencies and retaining callback constructors under R8. The optional URI path also needs a FileProvider, a widget_images cache path and launcher discovery declarations.
One configuration discrepancy needs resolution: sample_widget_info.xml omits android:initialLayout, although the bundled creation guide says it must be defined and suggests @layout/glance_default_loading_layout. The guide also contains receiver examples with different exported values. These settings need an app-specific decision before use.
Example
The supplied Glance example reads widget_hero.jpg from the app's files directory, requests a sampled bitmap for a 240 × 240 dp target and shares it across three responsive layouts. Its interface contains a revision label, the image when decoding succeeds and a Refresh button.
The button's callback queues unique one-time work. The worker increments stored revision values and requests widget updates; it performs no network request, file replacement or feed synchronization. The image file must be supplied by the app.
The classic receiver schedules the same worker, but that worker only updates SampleGlanceWidget instances. The separate updateClassicWidgetImage helper is never called by it. Completing a classic widget therefore requires connecting actual data work and a full RemoteViews update. These are descriptions of the source, not observed execution results.
Assessment & evidence
Limitations
The collection example conflicts with the general instruction never to decode inside provideContent: it decodes thumbnails there when a revision changes. The bundled creation guide also says provideGlance runs on the main thread and recommends switching threads for long operations, while the samples show synchronous file decoding without that dispatch.
FeedCollectionGlanceWidget receives a fixed list at construction and defaults to an empty list. It does not demonstrate fetching replacement items after a revision change. Its string-hash item IDs can collide; the source itself recommends persistent numeric IDs.
The bitmap helper uses approximate dimensions and configuration-based byte estimates. It neither performs an exact final resize nor checks the decoded bitmap's byteCount. Combined with the uncertain system ceiling, this means the code does not establish compliance on every device or display configuration. Compilation, release-build behavior, cross-profile image access and launcher compatibility remain unassessed.
Design reasoning
The preference for in-memory bitmaps makes the image payload explicit and avoids the cross-profile FileProvider permission problem described in the source. URI images avoid the serialized bitmap cap, but the bundled documentation says the launcher still decodes the referenced file at full resolution. The proposed tradeoff is to downsample either representation first.
Full classic-widget updates are recommended because the bundled guidance says partial updates retain earlier image actions. WorkManager examples address receiver background restrictions, while unique periodic work is proposed to avoid the one-time-work rescheduling loop described in SKILL.md. The files explain these choices but supply no comparative measurements.
Alternatives
For manual implementation without loading an assistant skill, the bundled Glance creation guide and classic AppWidget guide explain receivers, metadata and widget constraints. Their linked original pages are [https://developer.android.com/develop/ui/compose/glance/create-app-widget] and [https://developer.android.com/develop/ui/views/appwidgets]. Current live contents are not assessed.
For widget layout templates, SKILL.md directs users to glance-canonical-layouts. That separate skill is outside the supplied folder, so its capabilities are unknown here. An existing classic widget can use the RemoteViews guidance without a demonstrated migration to Glance; in-app Compose screens fall outside this resource's stated scope.
Evidence
The supplied folder contains SKILL.md, five Kotlin reference files, a manifest, two resource XML files, an R8 rules file and three bundled Android documentation pages. The repository-root LICENSE.txt supplies the licence terms. Together they establish the intended instructions and show concrete implementation details.
The documentation pages are copies within the same repository, so their platform claims do not constitute independent confirmation from live Android documentation. No complete application, build results, device logs, automated test results or benchmarks are supplied. Nothing was executed.
Access & freshness
Costs
The Apache 2.0 text grants copyright permissions without a licence charge. The evidence does not establish prices for an assistant, model usage, Android CLI services or any surrounding development service. Total adoption cost is unknown.
Image decoding, file compression and scheduled work consume device resources, but no measured memory savings, battery impact, execution time or implementation effort is supplied.
Rights
SKILL.md points to LICENSE.txt for its terms. The supplied repository-root file contains Apache License 2.0, which permits use, modification and redistribution subject to its conditions.
Redistribution requires providing the licence, marking changed files and retaining applicable source notices. Applicable NOTICE attributions must also be retained if a NOTICE file accompanies the work; none is supplied here. The licence includes a conditional contributor patent grant, limits trademark permission and provides no warranty.
Freshness
SKILL.md declares a last-updated date of 2026-11-12. The supplied source snapshot was captured on 2026-11-17 at repository revision c72942584fff970dac86ced78b367fce0c441e52.
That revision identifies the source described here, not a numbered skill release. Later repository changes, current dependency availability and compatibility with newer Android tooling are unknown. The metadata date does not establish that the examples were built or exercised.
Next steps
Obtain the complete original folder and confirm its declared dependencies against the app's toolchain. Preserve existing identifiers and targetSdk unless an Android 17 migration is intended. Resolve the loading-layout omission and receiver configuration before adopting the samples.
Connect real data synchronization to the worker, route classic-widget results into a full RemoteViews update and define how collection items refresh. Resolve the collection decoding inconsistency, keep expensive file work off the main thread and use persistent numeric item IDs where available.
After integration, validate callback taps in an R8-enabled release build, active-session updates, resizing, orientation changes and image memory across relevant display configurations. Assess profile boundaries if URI images remain necessary. The bundled Android 17 guide suggests adb shell dumpsys appwidget for inspecting serialized widget image usage; no such inspection results are supplied.
