
Glance Widget Updates and Memory
Guides Android home-screen widget state updates, background syncs, and bitmap memory limits on Android 17
- Repository
- android/skills
- Stars
- 10,278
- Licence
- Apache-2.0
- Files
- 7 files
What it does
Once installed, the agent follows this skill's guidance when you build or fix an Android home-screen widget made with Jetpack Glance or the classic AppWidgetProvider. It helps refresh widget content after background data changes, downsample images so they fit Android 17's widget memory limit, and fix certain crashes such as ActionCallback and foreground-service errors. It also points to reference Kotlin and XML examples and explains the manifest, FileProvider, and R8 setup.
Great for
- Android developers maintaining a Glance or AppWidget home-screen widget
- Teams migrating an app to targetSdk 37 (Android 17)
- Developers debugging frozen widgets or widget image crashes
Skip it if
- Glance layout template design, which the skill says is covered by a different skill (glance-canonical-layouts)
- In-app Jetpack Compose screens, which are explicitly out of scope
- Non-Android projects, since the guidance only applies to Android AppWidgets
Try asking
- “My Glance widget stops updating after my WorkManager job saves new data. How do I refresh it?”
- “Downsample images for my widget so it stays under the Android 17 RemoteViews memory cap”
- “Fix my AppWidgetProvider crash with ForegroundServiceStartNotAllowedException”
- “Update my AndroidManifest.xml and file_paths.xml to share content URIs with FileProvider for a widget”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 7 original files, the Apache-2.0 licence and an attribution note.
glance-appwidget-updates-and-memory.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip glance-appwidget-updates-and-memory.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip glance-appwidget-updates-and-memory.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Give the agent your build.gradle.kts and libs.versions.toml so it can keep your existing versions and package name intact.
- Point it at the specific widget file or crash message so it applies the right section (Glance vs classic AppWidgetProvider).
- Test on a real device or emulator after changes, since the memory cap depends on display size and the skill's estimates are approximate.
What's inside
- references/android/about/versions/17/behavior-changes-17.md
- references/android/develop/ui/compose/glance/create-app-widget.md
- references/android/develop/ui/views/appwidgets/index.md
- references/AndroidManifest.xml
- references/res/xml/file_paths.xml
- references/res/xml/sample_widget_info.xml
- SKILL.md
Redistributed unmodified from android/skills under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.