Skip to content

Conversation

@Moustachauve
Copy link
Owner

This commit adds support for widget previews, a feature introduced in Android 15 (Vanilla Ice Cream).

  • A WidgetPreviewPublisher is added to manage the publishing of widget previews to the launcher, handling versioning to avoid unnecessary updates.
  • The Glance library is updated to 1.2.0-rc01 to support the new preview APIs.
  • The WledWidget now implements providePreview to render a static preview in the widget picker.
  • The widget's description and name strings have been updated to be more descriptive.
  • The widget's metadata (wled_widget_info.xml) has been adjusted for better sizing in the launcher.

This commit adds support for widget previews, a feature introduced in Android 15 (Vanilla Ice Cream).

- A `WidgetPreviewPublisher` is added to manage the publishing of widget previews to the launcher, handling versioning to avoid unnecessary updates.
- The `Glance` library is updated to `1.2.0-rc01` to support the new preview APIs.
- The `WledWidget` now implements `providePreview` to render a static preview in the widget picker.
- The widget's description and name strings have been updated to be more descriptive.
- The widget's metadata (`wled_widget_info.xml`) has been adjusted for better sizing in the launcher.
@Moustachauve Moustachauve added feature minor For new features. labels Jan 15, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Moustachauve, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces comprehensive support for Android 15's new widget preview feature, enhancing the user experience by providing a visual representation of the WLED widget before it's placed on the home screen. It involves the creation of a dedicated publisher to efficiently manage preview updates and ensures compatibility by upgrading the underlying widget framework.

Highlights

  • Android 15 Widget Previews: Added support for the new widget preview feature introduced in Android 15 (Vanilla Ice Cream), allowing users to see a static preview of the WLED widget in the launcher picker.
  • Widget Preview Management: Introduced a new WidgetPreviewPublisher class to manage the publishing of widget previews to the launcher, handling versioning to prevent unnecessary updates and rate limiting.
  • Glance Library Update: Updated the Glance library to version 1.2.0-rc01 to leverage the latest APIs for widget preview functionality.
  • Widget Content and Metadata Enhancements: The WledWidget now implements providePreview to render a static preview, and widget description and name strings have been updated for clarity. Widget metadata (wled_widget_info.xml) was adjusted for better sizing in the launcher.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively adds support for widget previews on Android 15. The implementation is clean, using a WidgetPreviewPublisher to manage the preview generation and versioning, which is a good approach to avoid unnecessary work. The Glance library update and changes to the widget's metadata and string resources are all appropriate for this new feature.

I have a couple of suggestions to improve the code's maintainability and align it more closely with best practices, particularly regarding coroutine management and the use of magic numbers.

@Moustachauve Moustachauve merged commit eb5a733 into dev Jan 15, 2026
3 checks passed
@Moustachauve Moustachauve deleted the widget-preview branch January 15, 2026 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature minor For new features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants