I am using DownloadManager to download video files from a URL.
The problem is that if I use the default folder to upload the file, I do not see the video in the gallery.
Also, if I try to use this method:
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, 'filename');
I need to know the file name before downloading, in which case I am not .
And also, I don't have the file name in the url.
How can I do to get the file name from the headers and pass the name to the setDestinationInExternalPublicDir method? Other alternatives?
source
share