-
-
Notifications
You must be signed in to change notification settings - Fork 33
feat(widget): Add widget preview for Android 15 #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
Summary of ChangesHello @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
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this 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.
This commit adds support for widget previews, a feature introduced in Android 15 (Vanilla Ice Cream).
WidgetPreviewPublisheris added to manage the publishing of widget previews to the launcher, handling versioning to avoid unnecessary updates.Glancelibrary is updated to1.2.0-rc01to support the new preview APIs.WledWidgetnow implementsprovidePreviewto render a static preview in the widget picker.wled_widget_info.xml) has been adjusted for better sizing in the launcher.