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