You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I optionally donated to support the Fossify mission.
Feature description
Upon starting the app or reactivating it (if it was running just switched away and came back), it'd be nice to have an automatic reload of images in that directory. Due to performance reasons I understand if it gets a setting buried somewhere and default off as well.
Why do you want this feature?
So on graphene OS on pixel phones, thankfully we can use the awesome(ly working) factory camera app the google camera app without the google ecosystem. But, it is hardcoded to open google's photo gallery, so if it's not installed it will not open the gallery from the app just whine.
What we (including my wife) do now is manually switching to Fossify gallery. But there is an extra step to update the pictures (pull down), and that could be eliminated with this.
I also wonder to rename the package somehow to get it working straight from the camera app, but that's off topic.
Additional information
I'm very thankful for this project, thank you guys.
It should already work like this, see the video below (on my two non-rooted devices it works the same):
qemu-system-x86_64_nrhWGHWvfD.mp4
Are you doing it the same way? If so, maybe it's a problem with loading working too slow. Have you tried to wait a bit more? We have known performance issues related to the image list.
Thank you for your swift and kind reply, i looked around a bit more to see whats going on, and it is a funny racecondition between the camera app and fossify gallery.
I have made a screenrecording but im on the go, anyhow i switched between the two apps slowly to be visible on the recording. And voila, indeed on activity resume it reloads.
But!
If i make a photo and immediately switch to the gallery app, it refreshes BEFORE the picture is saved back in the camera app. And then it will never show up.
So, steps to reproduce:
Open f.g., select camera dir
Open the camera
Snap a photo and switch back to f.g. as fast as you can.
(With gesture nav its very easy to switch fast, probably you can't reproduce it with the three button nav)
If you can't reproduce or curious, at night i'll upload a video where you can see it happening.
So i wonder what would be a nice solution. The absolute nerd option would be two settings parameter:
Extra reload after resume
Extra reload delay
But it might be confusing for many:)
So maybe an "extra reloads after resume" option that would reload 4 time after resume with one second delay could be something inbetween?
So it would reload asap as the activity is resumed, then 4 more times after a second delay each might be good for most use cases.
I could only reproduce it by switching quickly between the apps, at the pace you've shown in the video it was working fine. What device model do you have?
I could only reproduce it by switching quickly between the apps, at the pace you've shown in the video it was working fine. What device model do you have?
Yeah, it probably depends on the device and the camera app. I'm using Pixel 7A with the Google Camera. It appears to think around quite a bit before saving the image to the storage apparently.
But it's good news that there is a pub/sub going on although it might be broken at the moment, but then no need to do extra refreshes.
Info:
Oneplus 6
Linage OS
Googlecamera (same picture viewing situation)
Happy to have found this:
Not sure if i should still make a new FR, pls tell me if i should:
But the thing i was going to report is.
It never "reloads"/"Advertises" New pictures if you are watching the till then newest one in full screen.
Meaning i cannot see newest pictures until i go to Picture overview and back again.
I was working on something just now, that had to do with the same problem.
So TLDR it seems that there are multiple notifications, the first would show IS_PENDING=1 (without readable image) and then an IS_PENDING=0 would arrive. Unsure of fossify gallery's logic, but maybe thats what is throwing it off.
Here is some proper AI slop that I think might be useful for the dev wanting to fix this.
I dug into this and found the root cause. I've prepared fixes I'd like to contribute.
Root cause: Google Camera inserts a new photo as a pending MediaStore row and finalizes it a few seconds later. When you switch back quickly, the reload on resume runs while the photo is still pending. MediaActivity.gotMedia() stores the "latest media ID" baseline used by the periodic check after the fetch has finished. So a photo finalized during the fetch ends up in the baseline but not in the list, and the check never sees a change. The photo then only shows up after the next resume or a pull-to-refresh. On my Pixel 7a this happens almost every time.
While measuring, I also found why it takes so long even when it works. On a folder with ~5700 items, one refresh took 4–5 s, and each new photo triggered several extra full rescans of the same folder (from the MediaStore observer and NewPhotoFetcher) that ran in parallel with that refresh. The fullscreen viewer issue mentioned above by @paskalito is separate: the viewer never refreshes its list.
I split this into four small, independent PRs. Each is one commit on top of main, passes build/tests/detekt/lint locally, and was tested on an emulator and on my Pixel 7a:
New photos show up (closes this issue): take the baseline before the fetch, check right away on MediaStore notifications while the folder is open, and reload once more if a change arrives during a reload. compare
Fewer queries per folder refresh (related to Slow Loading Thumbnails and File Propogation #54): one query for all video durations of the folder instead of one per video, and last-modified dates for the opened folder only. On my phone: 4.4–5.0 s → 2.3–2.8 s per refresh, with identical results. compare
No redundant folder rescans (related to Slow Loading Thumbnails and File Propogation #54): coalesce the rescans and defer them while the folder is open, since it reloads anyway. Together with 1 and 2, the time until a new photo appears went from "never" (or 19–30 s) to 5–12 s on my phone. compare
Fullscreen viewer shows new photos: refresh on resume and periodically while visible, keeping the current photo selected. compare
Since the contribution guidelines ask for the help wanted label first: would you add it here (and to #54 if you'd like 2 and 3 too), so I can open these as PRs? If you'd prefer a different split, or only some of them, just let me know.
Activity
Aga-C commentedon Aug 16, 2024
It should already work like this, see the video below (on my two non-rooted devices it works the same):
qemu-system-x86_64_nrhWGHWvfD.mp4
Are you doing it the same way? If so, maybe it's a problem with loading working too slow. Have you tried to wait a bit more? We have known performance issues related to the image list.
KopiasCsaba commentedon Aug 16, 2024
Dear @Aga-C ,
Thank you for your swift and kind reply, i looked around a bit more to see whats going on, and it is a funny racecondition between the camera app and fossify gallery.
I have made a screenrecording but im on the go, anyhow i switched between the two apps slowly to be visible on the recording. And voila, indeed on activity resume it reloads.
But!
If i make a photo and immediately switch to the gallery app, it refreshes BEFORE the picture is saved back in the camera app. And then it will never show up.
So, steps to reproduce:
(With gesture nav its very easy to switch fast, probably you can't reproduce it with the three button nav)
If you can't reproduce or curious, at night i'll upload a video where you can see it happening.
So i wonder what would be a nice solution. The absolute nerd option would be two settings parameter:
But it might be confusing for many:)
So maybe an "extra reloads after resume" option that would reload 4 time after resume with one second delay could be something inbetween?
So it would reload asap as the activity is resumed, then 4 more times after a second delay each might be good for most use cases.
Let me know what do you think!
KopiasCsaba commentedon Aug 16, 2024
Here is a video to show it: https://www.youtube.com/watch?v=w_KBMJ048GI
I also wonder that a loading indicator would be nice to be seen when reloading is in progress when it's just because of the activity resume.
Aga-C commentedon Aug 16, 2024
I could only reproduce it by switching quickly between the apps, at the pace you've shown in the video it was working fine. What device model do you have?
naveensingh commentedon Aug 17, 2024
New items should show up regardless because we have a content observer listening for changes:
Gallery/app/src/main/kotlin/org/fossify/gallery/activities/SimpleActivity.kt
Lines 21 to 32 in f649b1e
Evidently, it doesn't seem to be working correctly.
KopiasCsaba commentedon Aug 19, 2024
Yeah, it probably depends on the device and the camera app. I'm using Pixel 7A with the Google Camera. It appears to think around quite a bit before saving the image to the storage apparently.
But it's good news that there is a pub/sub going on although it might be broken at the moment, but then no need to do extra refreshes.
paskalito commentedon Mar 20, 2025
Info:
Oneplus 6
Linage OS
Googlecamera (same picture viewing situation)
Happy to have found this:
Not sure if i should still make a new FR, pls tell me if i should:
But the thing i was going to report is.
It never "reloads"/"Advertises" New pictures if you are watching the till then newest one in full screen.
Meaning i cannot see newest pictures until i go to Picture overview and back again.
Made a little video to show the behaviour:
screen-20250320-211424.mp4
naveensingh commentedon Mar 20, 2025
It is related, no need for a new issue :)
KopiasCsaba commentedon Mar 20, 2025
Just now i:
And those new images never showed up!
So sometimes it works, sometimes it doesnt.
KopiasCsaba commentedon Jun 9, 2026
I was working on something just now, that had to do with the same problem.
So TLDR it seems that there are multiple notifications, the first would show IS_PENDING=1 (without readable image) and then an IS_PENDING=0 would arrive. Unsure of fossify gallery's logic, but maybe thats what is throwing it off.
Here is some proper AI slop that I think might be useful for the dev wanting to fix this.
details.md
KopiasCsaba commentedon Nov 8, 2026
@naveensingh:
I dug into this and found the root cause. I've prepared fixes I'd like to contribute.
Root cause: Google Camera inserts a new photo as a pending MediaStore row and finalizes it a few seconds later. When you switch back quickly, the reload on resume runs while the photo is still pending.
MediaActivity.gotMedia()stores the "latest media ID" baseline used by the periodic check after the fetch has finished. So a photo finalized during the fetch ends up in the baseline but not in the list, and the check never sees a change. The photo then only shows up after the next resume or a pull-to-refresh. On my Pixel 7a this happens almost every time.While measuring, I also found why it takes so long even when it works. On a folder with ~5700 items, one refresh took 4–5 s, and each new photo triggered several extra full rescans of the same folder (from the MediaStore observer and
NewPhotoFetcher) that ran in parallel with that refresh. The fullscreen viewer issue mentioned above by @paskalito is separate: the viewer never refreshes its list.I split this into four small, independent PRs. Each is one commit on top of
main, passes build/tests/detekt/lint locally, and was tested on an emulator and on my Pixel 7a:Since the contribution guidelines ask for the
help wantedlabel first: would you add it here (and to #54 if you'd like 2 and 3 too), so I can open these as PRs? If you'd prefer a different split, or only some of them, just let me know.