Android widgets and Jetpack Compose: Making your app fancy
summary
Shows how Android 12’s Jetpack Compose support for widgets uses the Glance framework but stops short of full Compose: many composables (Canvas, MaterialTheme, animations) are unsupported, so Glance provides its own modifiers and a limited set of layout primitives. Demonstrates a working calendar widget and a failing compose clock that is salvaged with a remote View bitmap fallback. Explains state sync via DataStore preferenceState, manual calls to updateAppWidgetState, and using WorkManager or AlarmManager for periodic updates.
AI-written summary · about
chapters (15)
- 0:00Android widgets importance
- 1:49What is a widget
- 3:57Evolution before Android 12
- 6:28Old widget anatomy
- 10:32Traditional widget limits
- 12:39Jetpack Compose for widgets
- 14:34Glance framework widgets
- 17:29Glance unsupported features
- 19:43Glance data and state
- 21:51DataStore for updates
- 24:46Modern widget architecture
- 27:21Efficient update intervals
- 31:17Unsupported features and workarounds
- 33:03Widget future
- 34:31Q&A
related talks
27mTake a look at Jetpack Glance
38mBuilding Glanceables with Compose
24mShooting a “Glance” at App Widgets
35mNext Generation Android UI with Jetpack Compose
09mBuilding modern Android app widgets
01h 05mLet's build Android UI with Jetpack Compose
27mTake a look at Jetpack Glance
21mState of the art of Android widgets
