Take a look at Jetpack Glance
summary
Jetpack Glance is a Compose-runtime wrapper that still emits RemoteViews and requires Compose build features and the Kotlin compiler extension, currently at Alpha 5. State lives in GlanceStateDefinition backed by Preferences keyed by a glanceId that stays stable, updates require calling updateAppWidgetState and then update, and background work runs via WorkManager with a 15-minute periodic worker for automatic refresh. Widgets still need XML for provider, initial layout and drawables. The library is usable in production and the example weather widget works.
AI-written summary · about
chapters (15)
- 0:00Jetpack Glance widgets intro
- 1:07How Glance works under the hood
- 3:13Creating widget providers
- 4:21Building widget UI with Glance
- 6:54Glance components and modifiers
- 8:40Managing widget state
- 10:26Updating widget preferences
- 12:35Manual widget updates
- 13:38Handling click actions
- 14:41WorkManager widget updates
- 17:11Widget initial config
- 19:18Periodic widget updates
- 21:03Launch app from widget
- 22:31Why XML files in Glance
- 24:21Glance stability and future
related talks
27mTake a look at Jetpack Glance
39mAndroid widgets and Jetpack Compose: Making your app fancy
38mBuilding Glanceables with Compose
24mShooting a “Glance” at App Widgets
35mNext Generation Android UI with Jetpack Compose
45mOn the road to Jetpack Compose
35mDeclarative UI patterns
32mJetpack Compose — Next Gen Kotlin UI Toolkit for Android
