syncthing-android icon indicating copy to clipboard operation
syncthing-android copied to clipboard

MediaStore not updated

Open Devon22 opened this issue 1 year ago • 4 comments

The picture is deleted on the PC, and after syncing to Android, the MediaStore is not updated, and the result is shown in the following figure.

Screenshot_20220806-171206_Gallery

Version Information

App Version: 1.20.4
Syncthing Version: v1.20.4
Android Version: Android 12

Devon22 avatar Aug 06 '22 09:08 Devon22

Probably related to / caused by https://github.com/syncthing/syncthing-android/pull/1803.

tomasz1986 avatar Aug 06 '22 09:08 tomasz1986

Yes it is. As I wrote there, I am very interested in hearing about methods to let androids mediastore know about a deletion or let it check for a path, or directory content - really anything that makes it pick up the deletion without actually scheduling a deletion.
One thing to try is using the .scanFile method, but all (inofficial) info I found indicates that's not going to do anything - so my motivation to test is quite low. So hints/contributions welcome.

imsodin avatar Aug 06 '22 10:08 imsodin

Yes it is. As I wrote there, I am very interested in hearing about methods to let androids mediastore know about a deletion or let it check for a path, or directory content - really anything that makes it pick up the deletion without actually scheduling a deletion. One thing to try is using the .scanFile method, but all (inofficial) info I found indicates that's not going to do anything - so my motivation to test is quite low. So hints/contributions welcome.

stackoverflow says that you call MediaScannerConnection.scanFile with the name of the file that was just deleted. yes it seems counter intuitive at first but give it a go

steelbytes avatar Aug 30 '22 23:08 steelbytes

Is it possible to fix this problem? Version 1.23.4 still has the same problem.

Devon22 avatar Apr 12 '23 15:04 Devon22