Page 1 of 1

Trigger media rescan

Posted: 11 Dec 2013 12:00
by lchiocca
Hi Martin,

I've created a flow that moves certain media files from the internal to the external sdcard. The issue I have is that the gallery app still thinks the media is in the internal sdcard. So I've tried to google a way to do it, and found out that you can broadcast an intent to the trigger a rescan, but that doesn't work (or might have in the past, but not in kitkat). The official way would be to use a MediaScannerConnection, but - naturally - that isn't possible without you putting the feature in :(. Would it be possible to create an action that can trigger a media rescan?

Code: Select all

MediaScannerConnection.scanFile(context, paths /*String[]*/, mimeTypes /*String[]*/, null /* optional listener callback */
Thanks
Loris

Re: Trigger media rescan

Posted: 16 Dec 2013 11:52
by lchiocca
Martin,

Thinking about this topic a bit: I think although a "media rescan" action would be useful, it should actually be an option in the "move file" action. But either option would be fine :)

Loris

Re: Trigger media rescan

Posted: 14 Aug 2014 09:39
by nikopol78
Hi,

Did you find a solution, cause I'm have the exact same problem!
After having moved some photos, the gallery does not seem to be aware of the change. (on the contrary, when I do that manually in EZexplorer, the gallery immediately change the albums)

Has a media rescan function been made available in the list of features (I did not found it) or did you found a workaround?

Thank you for your answer,
Nicolas