glance-appwidget-updates-and-memory
Installation
SKILL.md
This skill provides guidance for managing state updates and keeping Android
AppWidgets that use Jetpack Glance (androidx.glance:glance-appwidget) or
RemoteViews within the Android 17 widget bitmap memory limits. For widget UI
layout templates, suggest the glance-canonical-layouts skill.
- When configuring a Glance widget, see Create an app widget with Glance.
- When targeting Android 17 (
targetSdk = 37), see Android 17 widget memory limits. - When maintaining a classic
AppWidgetProvider, see Create an app widget.
Prerequisites
- Kotlin Android project (
minSdk >= 26) withcompileSdk = 37(targetSdk = 37when targeting Android 17) inbuild.gradle.kts. - Jetpack Glance (
1.2.0, minimum1.1.1+) and the Compose compiler Gradle plugin enabled on the module.