Glance
| Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release | 
|---|---|---|---|---|
| August 27, 2025 | 1.1.1 | - | 1.2.0-beta01 | - | 
Declaring dependencies
To add a dependency on Glance, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.
Add the dependencies for the artifacts you need in the build.gradle file for
your app or module:
Groovy
dependencies { // For Glance support implementation "androidx.glance:glance:1.2.0-beta01" // For AppWidgets support implementation "androidx.glance:glance-appwidget:1.2.0-beta01" // For Wear-Tiles support implementation "androidx.glance:glance-wear-tiles:1.0.0-alpha07" } android { buildFeatures { compose true } composeOptions { kotlinCompilerExtensionVersion = "1.1.0-beta03" } kotlinOptions { jvmTarget = "1.8" } }
Kotlin
dependencies { // For Glance support implementation("androidx.glance:glance:1.2.0-beta01") // For AppWidgets support implementation("androidx.glance:glance-appwidget:1.2.0-beta01") // For Wear-Tiles support implementation("androidx.glance:glance-wear-tiles:1.0.0-alpha07") } android { buildFeatures { compose = true } composeOptions { kotlinCompilerExtensionVersion = "1.1.0-beta03" } kotlinOptions { jvmTarget = "1.8" } }
For more information about dependencies, see Add build dependencies.
Feedback
Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.
See the Issue Tracker documentation for more information.
Version 1.2
Version 1.2.0-beta01
August 27, 2025
androidx.glance:glance-*:1.2.0-beta01 is released. Version 1.2.0-beta01 contains these commits.
Bug Fixes
- Moving the default minSdkfrom API 21 to API 23 (Ibdfca, b/380448311, b/435705964, b/435705223)
Version 1.2.0-alpha01
May 7, 2025
androidx.glance:glance-*:1.2.0-alpha01 is released. Version 1.2.0-alpha01 contains these commits.
API Changes
- currentCompositeKeyHashis now deprecated. Use- currentCompositeKeyHashCodeinstead. The replacement API encodes the same hash with more bits, which exponentially reduces the chance of two random unrelated groups in the composition hierarchy from having the same hash key.(I4cb6a, b/177562901)
- Adds a new api to specify alpha (0fto1f) for the glance Image composable and the background image modifier. When not specified, retains the alpha from the source image. (I8ad05)
- Add Glance APIs for generated previews. Override GlanceAppWidget.providePreviewto provide a preview layout for your widget. Then, callGlanceAppWidgetManager.setWidgetPreviewto set your preview. (Iced16)
- Add MultiProcessGlanceAppWidgetto support multiprocess configurations (Idbb90)
- Removes experimental tag, we now support lambdas (I74d98, b/299361317)
- Allow specifying the lambda receiver for GlanceAppWidget.runComposition(I84829)
- Add previewSizeparameter torequestPinGlanceAppWidget(I9f8f0, b/303256067)
Bug Fixes
- Removed manual outlining of access to new platform APIs since this happens automatically via API modeling when using R8 with AGP 7.3 or later (e.g. R8 version 3.3) and for all builds when using AGP 8.1 or later (e.g. D8 version 8.1). Clients who are not using AGP are advised to update to D8 version 8.1 or later. See this article for more details. (If6b4c, b/345472586)
- Update glance-appwidgetlibraries tocompileSdk 35(I2e26b)
Version 1.1
Version 1.1.1
October 16, 2024
androidx.glance:glance-*:1.1.1 is released. Version 1.1.1 contains these commits.
Security Fixes
- As of this change, androidx compiles against protobuf 4.28.2 in order to address CVE-2024-7254. Upgrade your dependency on version 1.1.0 of androidx.glance:glance-appwidget-protoandandroidx.glance:glance-appwidget-external-protobufto 1.1.1 to address the vulnerability risk.
Version 1.1.0
June 12, 2024
androidx.glance:glance-*:1.1.0 is released. Version 1.1.0 contains these commits.
Important changes since 1.0.0
- Moves Glance to 1.1.0 stable.
Version 1.1.0-rc01
May 14, 2024
androidx.glance:glance-*:1.1.0-rc01 is released. Version 1.1.0-rc01 contains these commits.
New Features
- Added width and height parameters to Preview annotations for Glance. Moves 1.1.0 to Release Candidate.
API Changes
- Adds optional parameter to Scaffold. (If753f)
- Add width and height parameters to Glance @Preview. (Ibabe8)
- Remove support for glance wear tile previews. (I3850a)
- Added API for setting custom weight values for FontStyle. (I7390a)
- Rename Viewfinder'sImplementationModeEnums to better reflect underlying implementations, and add fixed constants forTransformationInfo.sourceRotation(Ic6149)
Bug Fixes
- Fixed a bug that caused rendering issues for ViewGroupsin backwards compatibility mode (I8de92)
External Contribution
- Experimental SharedTransitionScopeis now an interface rather than a class. (Iaf856, b/338415048, b/338414702)
Version 1.1.0-beta02
April 17, 2024
androidx.glance:glance-*:1.1.0-beta02 is released. This version contains source jars that were missing from the previous release.
Version 1.1.0-beta01
April 3, 2024
androidx.glance:glance-*:1.1.0-beta01 is released. Version 1.1.0-beta01 contains these commits.
Version 1.1.0-alpha01
February 7, 2024
androidx.glance:glance-*:1.1.0-alpha01 is released. Version 1.1.0-alpha01 contains these commits.
New Features
- Unit test library for Glance that doesn’t require UI Automator. Glance code can be tested directly without having to inflate the view.
- Higher level components for simpler layouts.
- New Modifiers and theme options.
- New API for getting a flow of RemoteViews from a composition, runComposition
API Changes
- Adds a new widgetBackgroundcolor role to Glance themes. (Ia2ab8)
- Add GlanceAppWidget.runComposition(I6344c, b/298066147)
- Adds new TopBarcomponent (Ibd361)
- Adds overrides to the clickablemodifier. (Iacecf)
- Adds a new api for tinting buttons. This should be experimental until 1.0 ships. (I92523)
- Adds runGlanceAppWidgetUnitTestthat provides scope to call methods onGlanceAppWidgetUnitTestsuch asprovideComposableto provide a small isolated composable for test,onNodeto find a Glance composable element in the provided content. This enables you to write unit tests for individual composable functions in your appWidget to verify that given certain inputs the function outputs the intended set of glance composable elements. (I2f682)
- Adds a testTagmodifier in semantics for use in unit tests. (I8f62f)
- update TitleBar- text and icon individually tintable. (Ia0a60)
- Adds scaffold component (I8a736)
- Adds hasActionRunCallbackClickActionfilter andassertHasActionRunCallbackClickActionassertion to testactionRunCallack. Also, adds additional shorthand variant functions for action related test filters -hasStartActivityClickAction<activityClass>(..),hasStartServiceAction<receiverClass>(..),hasSendBroadcastAction<receiverClass>(..). Adds similar variants for theirassertHasXXXcounterparts. (Ieca63)
- Moves unreleased api around. Changes a modifier from internal to public but library restricted (If2a08)
- Adds onCompositionErrormethod where developers can run code when an error occurs (I9b56f)
- Adds button and iconbutton apis to glance (I0fd6f)
- Adds isLinearProgressIndicator,isIndeterminateLinearProgressIndicator,isIndeterminateCircularProgressIndicatorfilters to match progress indicators. Additional includeshasAnyDescendantsfilter to test if a node has a descendant in its sub-hierarchy that matches a specific matcher (Ifd426)
- Adds assertions and filters to enable testing of click actions that start service / activity or broadcasts. Also includes testing if input elements are checked. (I3041c)
Version 1.0.0
Version 1.0.0-alpha07
August 27, 2025
androidx.glance:glance-wear-tiles:1.0.0-alpha07 is released. Version 1.0.0-alpha07 contains these commits.
New Features
- Glance wear tiles is now deprecated and will be removed in an upcoming release. It will replaced by the new glance wear widgets library.
API Changes
- Deprecates glance-wear-tiles (I82afd)
- Removing obsolete @RequiresApi(21)annotations (Ic4792)
- Removing obsolete @RequiresApi(21)annotations (I9103b)
- Removes an unused module. We are not moving forward with Templates. (I3fc90, b/430070874)
- Projects released with Kotlin 2.0 require KGP 2.0.0 or newer to be consumed (Idb6b5)
- Fixes api council feedback (I284c8)
- Adds a new api for tinting buttons. This should be experimental until 1.0 ships (I92523)
- Updated API files to annotate compatibility suppression (I8e87a, b/287516207)
- protolayout types are now fully supported across all tile-renderer APIS. (I428b0)
- Merged public and experimental API files for d,e,f,g-paths (I03646, b/278769092)
- Added *DefaultsAPI forButton,Checkbox,RadioButtonandSwitch. It brings glance closer in line with the patterns of Jetpack Compose. (I94828)
- New Glance templates module (I94459)
- We've added support for androidx.wear.protolayouttypes toTileRenderer(I4ac7f)
- More return type nullability of deprecated-hidden functions (Ibf7b0)
- Adding @JvmDefaultWithCompatibilityannotation (I8f206, b/251463569)
- Added support for using lambdas as callbacks (Ia0bbd)
Bug Fixes
- Update glance-appwidget libraries to compileSdk35 (I2e26b)
Version 1.0.0-alpha06
February 7, 2024
androidx.glance:glance-appwidget-preview:1.0.0-alpha06 and androidx.glance:glance-preview:1.0.0-alpha06 are released. Version 1.0.0-alpha06 contains these commits.
New Features
- Version updated to follow the main Glance module.
Version 1.0.0
September 6, 2023
androidx.glance:glance-*:1.0.0 is released. Version 1.0.0 contains these commits.
Major features of 1.0.0
- Move Glance to stable version 1.0.0
Version 1.0.0-rc01
July 26, 2023
androidx.glance:glance-*:1.0.0-rc01 is released. Version 1.0.0-rc01 contains these commits.
Moves Glance to rc01 on the way to stable release for 1.0.0.
New Features
- Adds key parameters to action lambdas for more stable action invocation.
- Adds the ability to provide to ActvityOptionstostartActivityactions.
- Adds support for Android 14
API Changes
- Added an optional key parameter for all elements that accept lambdas. (Id96c1, b/282445798)
- Add support for setting ActivityOptionsbundle foractionStartActivity(I6a08d)
- Merged public and experimental API files for d,e,f,g-paths (I03646, b/278769092)
- N/A, API file changes are just reordering methods (I5fa95)
- Add API for setting CoroutineContextforGlanceAppWidgetReceiverrequests (I0a100)
- Added a new API to provide ActivityOptionsforLazyColumnandLazyVerticalGridthat will be used for all actions in the list.(Id8d71)
Bug Fixes
- N/A, API file changes are just reordering methods (I5fa95)
- Glance text component style demo (Ie78a4)
Version 1.0.0-beta01
May 10, 2023
androidx.glance:glance-*:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.
New Features
- Moves the library into beta.
- Support for themeing using GlanceTheme, adds glance-material and glance-material3 modules to support material 2 and material 3 style themes in Glance.
- Support for FontFamilyadded to text apis.
- Moved GlanceAppWidgetto aWorkManagersession based update mechanism. Users of Glance forAppWidgetsshould now overrideGlanceAppWidget.provideGlanceinstead of the oldContentmethod. As this now happens in a worker, this is now a good place to load resources, database or network items without having to have a separate worker.
API Changes
- Added *DefaultsAPI forButton,Checkbox,RadioButtonandSwitch. It brings glance closer in line with the patterns of Jetpack Compose. (I94828)
- New Glance templates module (I94459)
- Making ResourceColorProviderinternal to module. Breaking change. Needed becauseResourceColorProvidershould only be used for dynamic theming to avoid situations where some colors are dynamic resources and some are fully resolved. (Ib0db7)
- Adds FontFamilyas an option forTextStyle. (Ic19ba, b/274179837)
- Value parameter name for Enum.valueOfchanged (Ia9b89)
- More thrown exceptions from enum valueOf(I818fe)
- Updated GlanceAppWidgetto useprovideGlanceas the main entrypoint.GlanceAppWidget.Contentis now deprecated. (I202b5)
- Adds an option to supply tint color for images (I26192, b/212418562)
- More return type nullability of deprecated-hidden functions. (Ibf7b0)
- Adding @JvmDefaultWithCompatibilityannotation (I8f206)
- Removed the unused SingleEntityTemplateData.displayHeader. (I7f094)
- Added support for using lambdas as callbacks (Ia0bbd)
- Moved DayNightColorProviderto glance module (I1842c, b/256934779)
- Removes LocalColorProviderfrom Templates. Templates will now useGlanceTheme.colors(Ic15e2)
- Removed nullability from Text(style: TextStyle)(I7123b, b/237012816)
- Default text color to black. remove nullability (I3072c, b/237012816)
- Making dynamic theme ColorProvidersits own object. MakingResourceColorProviderinternal to the module. (Id0e2d, b/237012816)
- Add the Undefined category to ImageSize. (I2fa39)
- Remove deprecated GlanceAppWidget.Contentfunction (Ib05f6)
- Adds modifier as a parameter to AndroidRemoteViews. (I515d4)
- Add GlanceAppWidget.composeto make unit testing easier (Ie9b28)
Bug Fixes
- Added a demo widget for Glance text fonts (I5c3d7)
- Makes AndroidRemoteViewssizable with Modifier.
- Issues with inconsistent theme colors resolved
- All resources now prefixed to avoid collisions
Version 1.0.0-alpha05
October 5, 2022
androidx.glance:glance:1.0.0-alpha05, androidx.glance:glance-appwidget:1.0.0-alpha05, and androidx.glance:glance-wear-tiles:1.0.0-alpha05 are released. Version 1.0.0-alpha05 contains these commits.
New Features
- Adds requestPinGlanceAppWidgettoGlanceAppWidgetManager, allowing apps to prompt a user to add their Glance based widget to their home screen. (Ic6e47)
- Adds ACTION_DEBUG_UPDATEtoGlanceAppWidgetReceiverto allow developers to force their widget to update from adb on rooted devices and emulators. (I94ae1)
API Changes
- Remove header action buttons in Glance templates to simplify use case. (Ie4387)
- Refactored Single Entity Template to reuse the Block subsystem design. (Iecd2c)
- Refactored Glance List Template to useText/Image/ActionBlock design. (If0cc1)
- Add priority number range for TextBlockandImageBlock. (I73100)
Bug Fixes
- Removed Material3 dependency. (I28d1c)
- Moves toward a more consistent system for adding margins and spacing in glance template layouts. (I29773)
- Fixes malformed Proguard rule that was blocking minified releases from building.
Version 1.0.0-alpha04
August 10, 2022
androidx.glance:glance:1.0.0-alpha04, androidx.glance:glance-appwidget:1.0.0-alpha04, and androidx.glance:glance-wear-tiles:1.0.0-alpha04 are released. Version 1.0.0-alpha04 contains these commits.
New Features
- Adds Button coloring features.
- Adds GlanceComposableannotation for better compile time checking.
- Adds Wear specific Glance features.
API Changes
- Update Glance Gallery Data API and Condensed View. (Ibc7a8)
- Adds ButtonColorsfor configuring buttons. (Iea88d, b/236305351)
- Rename ColorProvider.resolvetoColorProvider.getColor(Ic9dfe)
- Adds copy()method toTextStyle. (I9aef6)
- Adds a ColorProvidersclass that can be used as part of themes for Glance. (I848b9, b/237012816)
- Add List Template support to list styles and collapsed view. (I50cdc)
- Add semantics to GlanceModiierandGlanceCurvedModifier. (Ifda7e)
- Add GlanceComposableannotation. (I5dbf0)
- Moves Glance Templates into the main Glance project. (I9db94)
- Add ColorProvider.resolve()(Ife532, b/214733442)
- New method to get GlanceIdfrom an existingappWidgetIdor an intent from a configuration activity (Icb70c, b/230391946)
- Add GlanceComposableannotation. (I2c21f)
- Added GlanceRemoteViewsfor running composition outside ofGlanceAppWidget. (I18f92)
- Remove Color in ProgressIndicatorDefaults. (I40299)
- Rename ActionCallback's onRun method to onAction, for consistency with the public APIs, as required by the API review feedback. (Icfa57)
- Convert glance template layouts to use a map (I46bfd)
- Add RadioButtoncomposable (I4ecce)
- Added GlanceWearTilesfor composing wear tiles (Ia9f65)
- Added clickable to GlanceCurvedModifier(Iec2a0)
- Implement CurvedRowas a scope and create a DSL to add normal composable and/or curved elements. Also addedcurvedLineandcurvedSpacerwhich are translated toArcLineandArcSpacerin proto tiles (Ib955b)
- Updated nullability in core and appcompat to match Tiramisu DP2 (I0cbb7)
- Add support for RuncallbackActionin glance-wear-tiles, onlyRunCallbackActionwith NO parameter is supported for now (Ide64a)
External Contribution
- Updated :compose:ui:ui-test api (updateApi) due to test-coroutines-lib migration (I3366d)
Version 1.0.0-alpha03
February 23, 2022
androidx.glance:glance-*:1.0.0-alpha03 is released. Version 1.0.0-alpha03 contains these commits.
New Features
- Simplified state definition to default to Preferences.
API Changes
- Simplify state handling by make PreferencesGlanceStateDefinitionthe default state handling. RemovedGlanceAppWidget.updateAppWidgetStateand introducedupdateAppWidgetStatethat usesPreferencesby default. (I58963)
- Add Glance TemplateText class and update Template design (I4e146)
- Adds outline infrastructure for the Freeform template (If03d6)
- Updates to SingleEntityTemplatelayouts (If925d)
- Added LazyVerticalGrid(I5f442)
- Use ColorProvideronSingleEntityTemplate(I01ee0)
- Update template class name (I3720e)
- Added LinearProgressIndicatorandCircularProgressIndicatorcomposable. (Ie116b)
Bug Fixes
- Initial glance templates implementation, defines "single item template" data and example template layout (I35837)
- Align the tile cotent to center by default (I264be)
- Bug fix with fillMaxSize/Width/Height in glance-wear-tiles (I0a39f)
Version 1.0.0-alpha02
January 26, 2022
androidx.glance:glance-*:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits.
New Features
This release contains the set of APIs to build Wear Tiles using Compose runtime with composables optimized for "Glanceable"
- Declare your wear tile service by extending GlanceTileService, a service to create your tile in the composable Content() function.
- Wear tiles specific glance composables: CurvedRow,CurvedText.
- Handle different timeline modes for tile by defining TimelineMode.SingleEntryandTimelineMode.TimeBoundEntries.
- LocalTimeInterval, the Local composition refer to a specific time interval.
- BorderModiferis a- GlanceModifierapplying a border around an element.
This release also adds Progress Indicators to AppWidget Glance.
API Changes
- Added LinearProgressIndicatorandCircularProgressIndicatorcomposable. (Ie116b)
- Change actionStartBroadcastReceivertoactionSendBroadcast(I7d555)
- Pass Context to GlanceAppWidgetonDelete callback (I4c795)
Bug Fixes
- Correct handling of OPTIONS_APPWIDGET_SIZES if present but empty. (I01f82)
Version 1.0.0-alpha01
December 15, 2021
androidx.glance:glance:1.0.0-alpha01, androidx.glance:glance-appwidget:1.0.0-alpha01, and androidx.glance:glance-appwidget-proto:1.0.0-alpha01 are released. Version 1.0.0-alpha01 contains these commits.
Features in initial release
- The first release of Glance includes the first set of APIs to build AppWidget using Compose Runtime with a set of new Composables optimized for “Glanceables”.
Features
- Declare your app widgets with GlanceAppWidget and GlanceAppWidgetReceiver.
- Compose your UI with the initial set of Glance Composables: Box, Row, Column, Text, Button, LazyColumn, Image, Spacer.
- Apply modifiers to the composables using GlanceModifier methods.
- Handle user interaction with predefined Actions.
- Provide parameters to Action with ActionParameters.
- Handle different size modes by defining SizeMode.Single, SizeMode.Exact or SizeMode.Responsive.
- Persist GlanceAppWidget state by providing a GlanceStateDefinition.
- Local compositions like LocalContext, LocalState, LocalGlanceId, LocalSize.
- Interop with your existing RemoteViews with the AndroidRemoteViews Composable.
