Skip to content

feat(mobile): android widgets #19310

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

Merged
merged 19 commits into from
Jul 18, 2025
Merged

feat(mobile): android widgets #19310

merged 19 commits into from
Jul 18, 2025

Conversation

bwees
Copy link
Member

@bwees bwees commented Jun 19, 2025

Description

This adds widgets to Android, similar to those in #19148.

How Has This Been Tested?

Pixel 9 Pro Simulator

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)

@bwees bwees force-pushed the feat/android-widgets branch 2 times, most recently from 4dde2c8 to 3debd60 Compare June 26, 2025 14:52
@bwees bwees force-pushed the feat/android-widgets branch 2 times, most recently from 768bbee to 9d19c5e Compare July 7, 2025 20:25
@bwees bwees marked this pull request as ready for review July 7, 2025 20:26
@bwees bwees force-pushed the feat/android-widgets branch from b475a34 to 2ba18d4 Compare July 10, 2025 15:05
@alextran1502
Copy link
Member

First round of testing, running in release mode, I couldn't get the widget to load. The widget keep spinning at "Loading widget" screen

@bwees bwees force-pushed the feat/android-widgets branch 2 times, most recently from b2779bf to 9a9f5ac Compare July 15, 2025 15:37
@alextran1502
Copy link
Member

Okay, finally it works in production mode. I observed a few things

  • In the widget configuration screen, after selecting the album or toggling to show the album name, there is no confirmation button. The user needs to tap the close button to confirm, which is somewhat unintuitive. I think having the confirm or ok button will work better.
  • A side note for hard link, I wonder if once you open the asset viewer by tapping on the asset, navigating back will bring the user to that asset on the timeline so they can continue browsing around that time frame

@bwees
Copy link
Member Author

bwees commented Jul 16, 2025

Let's have a save button and then a "are you sure you don't want to save" dialog if you hit the close button.

We can talk to @shenlong-tanwen to see if there is a possibility to have the timeline scroll to a position for the deep link

@shenlong-tanwen
Copy link
Member

if there is a possibility to have the timeline scroll to a position for the deep link

Take a look at the handleLocateAsset method in gallery_app_bar.dart. We could probably do something similar to what it does and update the scrollToDateNotifierProvider to notify the grid to scroll to the asset's bucket

@alextran1502
Copy link
Member

@bwees Do you want to add the confirm button to the widget setting page and get this PR merged?

@bwees bwees force-pushed the feat/android-widgets branch from 1534fab to 137af08 Compare July 18, 2025 14:12
@alextran1502 alextran1502 merged commit f32d4f1 into main Jul 18, 2025
49 checks passed
@alextran1502 alextran1502 deleted the feat/android-widgets branch July 18, 2025 14:37
ollioddi pushed a commit to ollioddi/immich that referenced this pull request Aug 11, 2025
* wip

* wip widgets

* more wip changes

* latest changes

* working random widget

* cleanup

* add configurable widget

* add memory widget and cleanup of codebase

* album name handling

* add deeplinks

* finish minor refactoring and add some polish :)

* fix single shot type on random widget

Co-authored-by: shenlong <139912620+shenlong-tanwen@users.noreply.github.com>

* switch to ExposedDropdownMenuBox for random configure activity

* handle empty album and no connection edge cases

* android project cleanup

* fix proguard and gson issues

* fix deletion handling

* fix proguard stripping for widget model classes/enums

* change random configuration activity close to a checkmark on right side

---------

Co-authored-by: shenlong <139912620+shenlong-tanwen@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants