I'm currently running Marshmallow, and I have my application set up to download files into the phone's download folder by using the following path:
activity.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(file)));
is there a way I can simply "refresh" or "update" what is in the Downloads folder so they show up using the Android Downloads application?
The Downloads application only shows what is in its own
ContentProvider, which in turn is driven by what was downloaded through
DownloadManager. It is not showing the contents of any specific on-device directory, and that
ContentProvider is not documented or supported for independent access.
I have also tried using the media scanner Intent (to refresh the gallery), but from my understanding, this does not work for Marshmellow.
That, or using
scanFile(), will allow apps that query the
MediaStore to see your file. This includes the MTP daemon; MTP is how a desktop OS views the contents of an Android device's external storage. None of that directly affects the Downloads app.