After moving files using termux mv command, the update doesn't necessary propagated to Gallery application as shown bellow.
To update it, run this command line:
am broadcast -a android.intent.action.MEDIA_SCANNER_SCAN_FILE -d /sdcard/path
It will fix the Gallery app file list problem.
Read:
- ACTION_MEDIA_SCANNER_SCAN_FILE
- 2018-08-27 Manually trigger MediaScanner to scan files on Internal Storage on Nougat/Oreo
- Platform codenames, versions, API levels, and NDK releases
Side note: I am noticing weird behaviour, the developer page states that this intent is deprecated as of API level 29 (Android 10), but the intent is well broadcast and act upon.
No comments:
Post a Comment