Take a look at Jetpack Glance
summary
Shows a working weather widget built with Glance alpha5 using Compose runtime to emit RemoteViews, with per-widget state stored as GlanceId per-widget prefs via DataStore and GlanceStateDefinition. Uses clickable action run callback to enqueue a WorkManager job (one-time and periodic 15‑minute) that fetches OpenWeather, writes prefs, then triggers recomposition. Still requires XML for manifest/provider, initial_layout and drawables. Reported production use since February with no visible issues; sample repo needs an OpenWeather API key.
AI-written summary · about
chapters (10)
- 0:00Introduction to widgets
- 1:52What is Jetpack Glance
- 3:59Creating a weather widget
- 9:21State management in Glance
- 13:17Triggering widget updates
- 18:59Initial widget configuration
- 20:26Periodic widget updates
- 22:10Launching app from widget
- 23:13Why XML is still needed
- 24:37Final thoughts on Glance
related talks
27mTake a look at Jetpack Glance
38mBuilding Glanceables with Compose
39mAndroid widgets and Jetpack Compose: Making your app fancy
24mShooting a “Glance” at App Widgets
41mData-backed app widget development — with Jetpack Glance
37mShooting a “Glance” at App Widgets and Wear Tiles
35mNext Generation Android UI with Jetpack Compose
24mGetting Started with Material3 Colors in Jetpack Glance
