Closed jpvs0101 closed 4 years ago
Maybe MediaStore doesn't get updated. Sometimes this happens. I had this problem earlier in my app. I used MediaScannerConnection(context,String[]{path), mimeType, callback) after download finishes. This will update MediaStore.
Maybe MediaStore doesn't get updated. Sometimes this happens. I had this problem earlier in my app. I used MediaScannerConnection(context,String[]{path), mimeType, callback) after download finishes. This will update MediaStore.
What is exactly path means? uri.toString() or uri.getPath()? Because it seems like MediaScannerConnection() doesn't mind uris....
Path means the directory you want to scan. You can read about it more in the Android Documentation. For example, if you want to scan the Storage just pass Environment.ExternalStorageDirectory().
Path means the directory you want to scan. You can read about it more in the Android Documentation. For example, if you want to scan the Storage just pass Environment.ExternalStorageDirectory().
Scanning entire folder might take more battery. So scanning individual file is better. Also it is better if it is inbuilt in Fetch!
@jpvs0101 Fetch's main purpose and goal is to be the best file downloader on Android, not media organizer. I'd recommend after getting a file status of completed
your code calls the necessary APIs on MediaStore to make sure media files are synced properly.
I understand. Fetch saves file. Just one extra step needed for special cases like SAF. Otherwise it's purpose not fulfilled. Because saving files without access (partially) is not usually most developers expect. Atleast provide an option. It will be really helpful.
Pie - MIUI 11 (Redmi Note 7s) Issue happens when I Choose 'Download' (Default option SAF document chooser UI) as location. If I choose other folders, seems like works normal.
I use SAF in fetch. Sometimes newly downloaded files not updated in Android MediaStore. So other apps can't detect the file. (Device: Redmi Note 7s, MIUI 11, Android 9)
Example: Download several mp3 files using fetch. One or two files not showing in Music Player.