Skip to content

Guide · Agent skill

How to use the Glance Widget Updates and Memory agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

This guide explains what the glance-appwidget-updates-and-memory agent skill does, how to install it, and how to ask your agent for help with it. It is for Android developers who build or maintain a home-screen widget made with Jetpack Glance or a classic AppWidgetProvider. After reading, you will know how to install the skill, which requests will trigger it, and what to check in your project before you rely on its output.

Glance Widget Updates and Memoryandroid/skills · Apache-2.0

Quick start

  1. 1Download the ZIP. Download the glance-appwidget-updates-and-memory skill ZIP from the skill page on this site.
  2. 2Unzip it into a skills folder. Unzip the file into ~/.claude/skills/ for all projects, or into the project's .claude/skills/ folder for one project.
  3. 3Or upload it in the Claude apps. In the Claude apps, open Settings, go to Capabilities, then Skills, and upload the ZIP.
  4. 4Confirm your project's requirements. Check minSdk 26 or higher, compileSdk 37, the Glance library (1.2.0 recommended) and the Compose compiler plugin.
  5. 5Describe your widget problem. Ask the agent in plain words, mentioning Glance, AppWidget or the symptom, such as a stale widget or a crash.
  6. 6Review and test the changes. Read the diff the agent produces, build the project, and test the widget on a device or emulator before release.

What the skill makes the agent do

Once installed, the agent follows this skill's guidance when you build or fix an Android home-screen widget that uses Jetpack Glance (androidx.glance:glance-appwidget) or a classic AppWidgetProvider. The skill covers refreshing widget content after background data changes, downsampling images so they fit the widget bitmap memory limit on Android 17 (API 37), and fixing certain crashes such as ActionCallback NoSuchMethodException and AppWidgetProvider ForegroundServiceStartNotAllowedException errors when used with WorkManager.

It also points to reference Kotlin and XML examples and explains the manifest, FileProvider, and R8 setup needed for widgets.

  • Refresh widget UI after DataStore preference updates made in a CoroutineWorker, by calling GlanceAppWidget.update or GlanceAppWidget.updateAll after state changes.
  • Downsample images to the widget's target size and stay within a per-image byte ceiling estimated from the display size.
  • Share content:// images with the launcher through FileProvider and read permissions.
  • Use full AppWidgetManager.updateAppWidget calls, not partial updates, when a widget's bitmaps or Icons are replaced.
  • Check the manifest receiver, widget info XML, FileProvider paths and R8 rules.

Install the skill

Download the skill's ZIP from the skill page on this site. Then choose one of two ways to install it, depending on how you use your agent.

For Claude Code, unzip the download into ~/.claude/skills/ to make the skill available in all your projects, or into a project's .claude/skills/ folder to make it available only in that project.

If you use the Claude apps, open Settings, go to Capabilities, then Skills, and upload the ZIP there.

  • Personal install: unzip into ~/.claude/skills/.
  • Project install: unzip into the project's .claude/skills/ folder.
  • Claude apps: Settings → Capabilities → Skills, then upload the ZIP.

Check that your project meets the requirements

The skill assumes a Kotlin Android project. Before you rely on it, confirm that your module meets the prerequisites listed in the skill: minSdk 26 or higher, compileSdk 37, the Android Gradle Plugin, Kotlin, and the Compose compiler plugin enabled, and the androidx.glance:glance-appwidget library. The skill recommends Glance 1.2.0, and states a minimum of 1.1.1 or later.

Targeting Android 17 also requires targetSdk 37. The skill says to change targetSdk only when you are deliberately migrating the app, and to keep your existing namespace, applicationId, package and toolchain versions.

  • Kotlin Android project with minSdk 26 or higher.
  • compileSdk 37 in build.gradle.kts; targetSdk 37 only when migrating to Android 17.
  • Android Gradle Plugin, Kotlin and Compose compiler plugin.
  • androidx.glance:glance-appwidget, recommended at 1.2.0.

Trigger the skill with natural requests

You do not need to name the skill. Describe the widget problem in plain words that mention Android widgets, Glance, or AppWidgetProvider, and the agent should pick up the skill when your request matches its description. Mentioning the specific symptom, such as a frozen widget or a crash, helps the match.

The skill is designed for widget work. For Glance layout template design, the skill directs you to a different skill, glance-canonical-layouts. It does not cover in-app Jetpack Compose screens.

  • 'My Glance widget doesn't refresh after my CoroutineWorker updates DataStore. Fix it.'
  • 'Our home-screen widget crashes with ActionCallback NoSuchMethodException. What's wrong?'
  • 'Downsample the cover images in my AppWidget so they fit the Android 17 memory limit.'
  • 'We are moving our app to targetSdk 37. Check our widget receivers and manifest.'
  • 'Set up a FileProvider so the launcher can read a widget image from cacheDir.'

Examples of what you can ask for

A typical session starts with the agent reading your build files and widget code, then applying the skill's rules. The skill tells the agent to inspect build.gradle.kts, gradle/libs.versions.toml and your Kotlin files first, and to keep the versions and package names already in use.

For image-heavy widgets, the skill advises decoding shared bitmaps once before provideContent, then passing them to ImageProvider so RemoteViews can deduplicate them. If your widget scales distinct bitmaps by size, the skill says to divide the memory cap by the number of distinct bitmaps.

  • Review a Glance widget that shows a LazyColumn of feed items and suggest where to refresh it after background sync.
  • Find where a classic AppWidgetProvider replaces bitmaps with partiallyUpdateAppWidget and switch those calls to updateAppWidget.
  • Add the manifest entries for a GlanceAppWidgetReceiver, a widget info XML file and a FileProvider.
  • Check whether a widget decodes full-resolution images that would exceed the per-image limit.

Safety notes: scripts and network

According to the skill listing, this skill does not run scripts and does not use the network. Its contents are guidance and reference files: markdown documentation, a SKILL.md file, and Kotlin and XML examples that the agent reads and adapts to your project.

The skill's own guidance still asks you to review the changes. Treat its output like any code change: read the diff, build the project, and test the widget on a device or emulator before you ship it.

  • Runs scripts: no.
  • Uses network: no.
  • Licence: Apache-2.0, with full terms in the LICENSE.txt file that accompanies the skill.
  • Author listed as Google LLC.

Tips for better results

Give the agent the symptom and the widget type. A message such as 'frozen Glance widget after background sync' or 'classic AppWidgetProvider image crash on Android 17' lets it choose the right reference file quickly.

Ask the agent to explain any memory estimate it makes. The skill computes the cap as 6 * width * height bytes from the window metrics, but it notes that the system does not expose this cap in a public API, so treat the number as an estimate.

  • Name whether the widget is Glance or AppWidgetProvider.
  • Say whether you are migrating to targetSdk 37 or only fixing a bug.
  • Paste the exact crash message or the stack trace.
  • Ask for the manifest, widget info and R8 changes in the same request, since they are often missing together.

What people use it for

  • Fixing a Glance widget that does not show new data after a background CoroutineWorker updates DataStore.
  • Reducing image sizes so a widget stays within the Android 17 bitmap memory limit.
  • Diagnosing ActionCallback or foreground-service crashes in a widget that uses WorkManager.
  • Preparing a widget app for migration to targetSdk 37 by checking manifest receivers and FileProvider setup.

Frequently asked questions

How do I install the glance-appwidget-updates-and-memory skill?

Download the skill ZIP from the skill page, then unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder for one project. In the Claude apps, you can instead upload the ZIP under Settings, Capabilities, Skills.

What do I need before I can use this skill?

You need a Kotlin Android project with minSdk 26 or higher, compileSdk 37, the Android Gradle Plugin, Kotlin, the Compose compiler plugin, and the androidx.glance:glance-appwidget library. The skill recommends Glance 1.2.0. It is meant for widgets, not for general Android apps.

Is the skill free, and what licence does it use?

The listing states the licence is Apache-2.0, and the skill points to a LICENSE.txt file for the complete terms. Read that file for the exact conditions of use.

Does the skill run scripts or access the internet?

No. The listing says the skill does not run scripts and does not use the network. It provides guidance and reference code that the agent reads and applies to your project.

Does this skill design Glance layouts?

No. Layout template design is covered by a different skill, glance-canonical-layouts. This skill focuses on state updates, background syncs, RemoteViews memory limits, and related crashes.

Can I use this skill for an in-app Jetpack Compose screen?

No. The skill is explicitly out of scope for in-app Compose screens. It applies only to Android AppWidgets built with Glance or AppWidgetProvider.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you maintain an Android home-screen widget built with Jetpack Glance or AppWidgetProvider, especially if you are migrating to targetSdk 37 or debugging a frozen widget or image crash. Pick something else for Glance layout design, in-app Compose screens, or any project that is not an Android app.

Download the skill