I am building an application in android where users can download remote files and save them to the external storage downloads directory. It works well and I am able to view files through Es File Explorer and other file explorer tools. But those files are not appearing in Downloads App in my Nexus 4 device. Please note that I am not using DownloadManager, instead I am creating HttpUrlConnection to remote server and downloading files.
Can anybody please tell me how to make the downloaded files appear in Downloads App without using DownloadManager?
You have to use DownloadManager
to make the files show up in the app, but that doesn't mean you have to download them with DownloadManager
. From API 12 onwards you can call DownloadManager.addCompletedDownload
to add a file you've already downloaded to the downloads ContentProvider
and therefore also to the GUI.