Skip to content

Conversation

@timusus
Copy link
Owner

@timusus timusus commented Nov 16, 2025

  • Add Glance dependencies (androidx.glance:glance-appwidget and glance-material3)
  • Migrate WidgetProvider41 and WidgetProvider42 to use GlanceAppWidget instead of AppWidgetProvider
  • Replace RemoteViews-based UI with Glance composables
  • Create action callbacks (PlayPauseAction, NextTrackAction, PreviousTrackAction) for playback controls
  • Update WidgetManager to use Glance's updateAll() API instead of broadcast intents
  • Add WidgetEntryPoint interface for Hilt dependency injection in GlanceAppWidgets
  • Remove deprecated ShuttleAppWidgetProvider base class
  • Delete unused widget layout XML files (appwidget_41.xml, appwidget_41_dark.xml, appwidget_42.xml, appwidget_42_dark.xml)

The widgets now use Glance's declarative API, providing a more modern and maintainable implementation while preserving all existing functionality including dark mode support and background transparency control.

- Add Glance dependencies (androidx.glance:glance-appwidget and glance-material3)
- Migrate WidgetProvider41 and WidgetProvider42 to use GlanceAppWidget instead of AppWidgetProvider
- Replace RemoteViews-based UI with Glance composables
- Create action callbacks (PlayPauseAction, NextTrackAction, PreviousTrackAction) for playback controls
- Update WidgetManager to use Glance's updateAll() API instead of broadcast intents
- Add WidgetEntryPoint interface for Hilt dependency injection in GlanceAppWidgets
- Remove deprecated ShuttleAppWidgetProvider base class
- Delete unused widget layout XML files (appwidget_41.xml, appwidget_41_dark.xml, appwidget_42.xml, appwidget_42_dark.xml)

The widgets now use Glance's declarative API, providing a more modern and maintainable implementation while preserving all existing functionality including dark mode support and background transparency control.
Implements #86 - new widget with emphasis on album artwork display.

- Create WidgetProvider43 using Glance with large 200dp artwork
- Configure as 4x3 widget with minimum size 250x180dp
- Display artwork prominently with song info (title, artist, album) below
- Include full playback controls (prev, play/pause, next) at bottom
- Add placeholder layout for all Glance widgets (appwidget_placeholder.xml)
- Update existing widget configs to use placeholder layout
- Register Widget43 in AndroidManifest.xml with "Shuttle 4x3" label
- Update WidgetManager to refresh Widget43 on playback/queue changes

The widget provides a beautiful full-screen artwork view while maintaining all playback functionality and supporting dark mode and transparency preferences.
- Remove unused imports
- Convert getPlayPauseIcon functions to expression syntax
- Reorder imports according to ktlint rules
Implements #123 - widgets now automatically follow system theme.

Changes:
- Update all widget providers (41, 42, 43) to use system dark mode detection
- Use Configuration.UI_MODE_NIGHT_MASK to check system theme
- Remove manual dark mode toggle from widget preferences
- Update WidgetPreferenceFragment to remove dark mode preference listener
- Remove unused Preference import

The widgets now automatically adapt to system light/dark mode changes without requiring manual user configuration.
@timusus timusus changed the title Migrate widgets to use new system Migrate widgets to use Glance Nov 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants